home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 031a / boss_03.zip / BOSS.MAN next >
Text File  |  1991-10-31  |  327KB  |  10,793 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                  The Window BOSS
  13.                                         &
  14.                                    Data Clerk
  15.  
  16.  
  17.                                 Revision 10.30.91
  18.                                   Version 6.13
  19.  
  20.  
  21.  
  22.  
  23.                          Star Guidance Consulting, Inc.
  24.                                  273 Windy Drive
  25.                           Waterbury, Connecticut 06705
  26.  
  27.                                  (203) 574-2449
  28.  
  29.  
  30.  
  31.  
  32.                                _______
  33.                           ____|__     |               (tm)
  34.                        --|       |    |-------------------
  35.                          |   ____|__  |  Association of
  36.                          |  |       |_|  Shareware
  37.                          |__|   o   |    Professionals
  38.                        -----|   |   |---------------------
  39.                             |___|___|    MEMBER
  40.  
  41.  
  42.  
  43.  
  44.  
  45.                 Copyright (c) 1984-1991 by Philip A. Mongelluzzo
  46.                                All Rights Reserved.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.         The Window BOSS Shareware diskette,  containing a copy of this 
  53.         manual  may  be freely copied and shared,  but printed copies  of 
  54.         this document may not be copied in any way without permission  in 
  55.         writing from Star Guidance Consulting.  Thank you.  
  56.                                                      The Window BOSS
  57.  
  58.  
  59.  
  60.         1. Introduction
  61.  
  62.         The Window BOSS is one of the most powerful and cost-effective 
  63.         products available to enhance and accelerate the development of 
  64.         system and applications programs in the "C" language.  The BOSS 
  65.         will let you create programs that have the same look and feel as 
  66.         top sellers like Lotus 1-2-3, Sidekick, dBASE III, and Framework!  
  67.         Pop-up windows, pull down menus, status lines, and in context on-
  68.         line help functions can be easily implemented.  Your applications 
  69.         can drag windows around the screen and automatically sense the 
  70.         video card installed.  All of this without snow, flicker, or 
  71.         delay! 
  72.  
  73.         The BOSS's assistant, The Data Clerk is always on call to handle 
  74.         the tasks associated with data entry.  Whether they be as simple 
  75.         as fetching a line of text or as complicated as the coordination 
  76.         of filling out a form, the Data Clerk will be there to assist, 
  77.         and if necessary, validate precious information as it is entered.
  78.  
  79.         Registered users can take advantage of our "Source Plus" policy 
  80.         that provides meticulously commented source code, technical 
  81.         support, and minimal fee updates.
  82.  
  83.         2. Technical Nitty Gritties
  84.  
  85.         The Window BOSS supports PC/MSDOS for the IBM PC/XT/AT, PS/2 and 
  86.         compatibles.   However, you'll need one of the following 
  87.         compilers in order to take advantage of the state-of-the-art 
  88.         techniques available from the BOSS:
  89.  
  90.                               Microsoft C & Quick C
  91.                              Borland C++ & Turbo C++
  92.                         Lattice C, Watcom C, Mix Power C
  93.                               TopSpeed C, Zortech C
  94.  
  95.         The BOSS is written in "C" and assembly language.  You'll need 
  96.         the Microsoft Assembler, MASM, to assemble any local changes to 
  97.         the assembler source.
  98.  
  99.           Stats:
  100.  
  101.              Maximum windows:    limited only by compiler and memory
  102.              Maximum window:     full screen (25x80, 43x80, 50x80)
  103.              Minimum window:     1 row 1 column (borderless)
  104.                                  3 rows 3 columns (framed)
  105.              Minimum fields:     none
  106.              Maximum fields:     limited only by compiler and memory
  107.  
  108.           Operation:
  109.  
  110.              Simply include the library at link time and invoke the 
  111.              function desired.  
  112.  
  113.  
  114.  
  115.  
  116.                                                            Page: 1
  117.                                                      The Window BOSS
  118.  
  119.  
  120.  
  121.         3. User Supported Software
  122.  
  123.         Star Guidance Consulting distributes The Window BOSS with a 
  124.         unique marketing approach called Shareware.  The Shareware 
  125.         diskette and its programs and manual may be freely copied and 
  126.         shared.  It is also available from Star Guidance for $20.00. We 
  127.         ask you to help us distribute The Window BOSS by sharing 
  128.         unmodified copies of the Shareware diskette with others.  We also 
  129.         encourage you to register your copy for $55.00.  You'll find a 
  130.         registration form at the end of this manual.  Thank you for your 
  131.         support and enjoy the BOSS.  
  132.  
  133.         3.1. Registering
  134.  
  135.         Shareware is a term for software that can be freely copied and 
  136.         shared.  The term describes copyrighted software which the author 
  137.         supports and encourages people to copy and share.
  138.  
  139.         Shareware is like public television:  the programming is freely 
  140.         distributed, but support from users is encouraged.  The concept 
  141.         is based on these principles:
  142.  
  143.           1. People need to try programs to see if they are useful.
  144.           2. Software authors can be supported directly by users.
  145.           3. Copying and networking of programs can be encouraged.
  146.  
  147.         We encourage you to register your copy of The Window BOSS for 
  148.         $55.00.  Registration has a number of benefits to you:
  149.  
  150.           1. Serialized diskette containing all source code for all 
  151.              supported compilers.
  152.           2. Telephone Support and minimal fee updates. Minimal fees 
  153.              cover the cost of media, packaging materials, shipping, 
  154.              handling, and update preparation.
  155.           3. Thanks from us for your support and encouragement!
  156.  
  157.         3.2. Support Services
  158.  
  159.         You may call, write, or use one of the supported commercial 
  160.         services (CompuServe, GENIE, BIX) to obtain support and 
  161.         assistance. Unless the problem is relatively complex, you will 
  162.         get the best results by calling. Electronic mailboxes are checked 
  163.         on daily basis (excluding weekends & holidays) and are a very 
  164.         effective way of communicating. Electronic mailboxes are great 
  165.         for passing problem code samples and receiving work-arounds 
  166.         and/or problem specific updates. If you write, please include a 
  167.         phone number and the times when you will be available. Our 
  168.         response to written questions is much slower, but we do give 
  169.         priority to overseas users. We are available between 9AM and 5PM 
  170.         Monday through Friday, and sometimes on Saturday and Sunday.
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.                                                            Page: 2
  178.                                                      The Window BOSS
  179.  
  180.  
  181.  
  182.         Support Services - continued.
  183.  
  184.  
  185.  
  186.         With reference to calls, if we do not call back, please remember 
  187.         that about 50% of our call backs do not get completed because of 
  188.         faulty phone numbers, unanswered, or busy phones. If we have not 
  189.         called back within 1 business day, call us again.  Frequent, 
  190.         difficult to reach, or foreign callers can expect "person to 
  191.         person" collect return calls.
  192.  
  193.         3.2.1. Electronic Support
  194.  
  195.         Electronic support is provided on GENIE, CompuServe, and BIX.
  196.         Support previously provided by our BBS is now provided on these 
  197.         services.  You are strongly advised to obtain a USER ID on at 
  198.         least one of these fine services as no other form of electronic 
  199.         support can be provided.
  200.  
  201.         On GENIE, a special topic on the IBM PC Round Table Bulletin 
  202.         Board has been set up to provide support to Window BOSS users.  
  203.         The Window BOSS topic can be found in the "On-Line Product 
  204.         Support" category of the Bulletin Board.  As of this writing, 
  205.         the IBM PC Round Table main menu is page 615 and the "On-Line 
  206.         Product Support" category is category # 30 of the Round Table's 
  207.         Bulletin Board.  Simply move to page 615 by typing "M 615", 
  208.         select the IBM PC Round Table Bulletin Board from the menu by 
  209.         typing "1", then SET the category by typing "SET 30".  Reading 
  210.         and entering messages is straight forward. The on-line help 
  211.         system and GENIE's user guide should assist you if you have 
  212.         questions.  If you prefer, you can leave mail addressed to 
  213.         MONGELLUZZO.  Round Table and Mail messages are answered on a 
  214.         daily basis.  If you need information on obtaining a GENIE 
  215.         account  you can call GENIE toll free at 800-638-9636.
  216.  
  217.         CompuServe electronic correspondence is limited to EMAIL.  Our 
  218.         EMAIL ID is [71565,1001].  SIG(s) are also occasionally checked 
  219.         for messages but should not be considered a vehicle for effective 
  220.         communication to Star Guidance.  If you are a CompuServe user and 
  221.         you need to reach us, use EMAIL.  EMAIL messages are answered on 
  222.         a daily basis.  If you need information on obtaining a CompuServe 
  223.         account you can call CompuServe toll free at 800-848-8199.
  224.  
  225.         BIX electronic correspondence is limited to Electronic Mail.  Our 
  226.         BIX NAME is "pmongelluzzo". The conference areas in the 
  227.         "ibm.exchange" are also occasionally checked for messages but 
  228.         should not be considered a vehicle for effective communication to 
  229.         Star Guidance.  If you are a BIX user and you need to reach us, 
  230.         use EMAIL.  EMAIL messages are answered on a daily basis.  If you 
  231.         need information on BIX can reach them at 800-227-2983 (in 
  232.         New Hampshire and outside the United States call 603-924-2983).
  233.  
  234.  
  235.  
  236.  
  237.  
  238.                                                            Page: 3
  239.                                                      The Window BOSS
  240.  
  241.  
  242.  
  243.         4. The Basics
  244.  
  245.         The Window BOSS is an extensive library of C functions for the 
  246.         creation, the management and the manipulation of text windows.  
  247.         We take care of all the housekeeping and let you, the programmer, 
  248.         get on with developing your application with a minimum of fuss.
  249.  
  250.         Both The Window BOSS and The Data Clerk are based on a layered 
  251.         software design in which powerful, easy to use functions are 
  252.         created from a series of lower level primitives.  As a 
  253.         programmer, you will quickly appreciate our clean and uncluttered 
  254.         approach to getting the job done.
  255.  
  256.         Windows are created and defined by opening them. Once created, 
  257.         you can write to them, move them around, change their attributes, 
  258.         use them as the basis for data entry, or "kill" them by closing 
  259.         them.  Windows are nothing more than a sub display of a larger 
  260.         display - the physical screen.  They are defined to have size, 
  261.         location, and attributes like foreground color, background color, 
  262.         border colors and so on.  The BOSS includes a whole host of 
  263.         functions for defining and manipulating your windows.
  264.  
  265.         Windows can also serve as the backdrop for data entry.  Once a 
  266.         window is created, you can use it to convey information or to 
  267.         retrieve it!  The Data Clerk will assist you in obtaining the 
  268.         desired goal, whether it be as simple as a single line of text or 
  269.         as complex as a complete form. 
  270.  
  271.         Forms are an ordered collection of input requests (fields) that 
  272.         occur within a specific window.  Fields have size, location 
  273.         (relative to the window which they will be displayed in), and 
  274.         attributes (foreground color, background color, mask values, fill 
  275.         characters, type [integer, float, long, text], validation 
  276.         ranges and so on).  Like windows, forms are created by opening 
  277.         them.  Their contents must then be defined by using the field 
  278.         definition functions provided, or with your own custom field 
  279.         definition functions.  Once created and defined, a form becomes 
  280.         part of the window and moves with it. Forms are "killed" by 
  281.         closing them (n.b. killing a form has no effect on the window to 
  282.         which it was anchored or to the information displayed in it, form 
  283.         or otherwise). The same functions used to input single data items 
  284.         are used to build forms.  This consistency, coupled with an 
  285.         uncluttered approach and flexibility, gives The Window BOSS its 
  286.         power.    
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.                                                            Page: 4
  300.                                                      The Window BOSS
  301.  
  302.  
  303.  
  304.         4.1. Window Basics
  305.  
  306.         Here is the famous "hello" program!  As you can see it's pretty 
  307.         simple to get windows into your applications with The Window 
  308.         BOSS!!  You should review this code in conjunction with the 
  309.         function descriptions found in this manual and the concepts 
  310.         outlined in the Important Concepts section following the 
  311.         examples.
  312.  
  313.         #include "winboss.h"            /* REQUIRED */
  314.         main()
  315.         {
  316.         WINDOWPTR w1;                   /* window handle */
  317.         int batrib;                     /* border atrib */
  318.         int watrib;                     /* window atrib */
  319.  
  320.         /*
  321.          * Set attributes:
  322.          *
  323.          *      border - blue/white box
  324.          *      window - white background/black letters
  325.          *
  326.         */
  327.  
  328.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  329.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  330.  
  331.         /*
  332.          * Open window at 0,0 - 25 cells wide and 10 cells high
  333.         */
  334.  
  335.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  336.           if(!w1) exit();       
  337.  
  338.         /*
  339.          * Print the famous string and wait for key to be struck.
  340.          * Close window on key strike.. exit.
  341.         */
  342.  
  343.           wn_printf(w1,"Hello World...");
  344.           v_getch();                    /* wait for key */
  345.           wn_close(w1);                 /* close the window */
  346.           exit(0);                      /* and exit */
  347.         }
  348.  
  349.         /* End */
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.                                                            Page: 5
  361.                                                      The Window BOSS
  362.  
  363.  
  364.  
  365.         4.2. Data Entry Basics
  366.  
  367.         Lets expand our "hello" program to prompt and fetch a name.
  368.  
  369.         #include "winboss.h"            /* REQUIRED */
  370.         main()
  371.         {
  372.         WINDOWPTR w1;                   /* window handle */
  373.         int batrib;                     /* border atrib */
  374.         int watrib;                     /* window atrib */
  375.         char name[15];                  /* name */
  376.  
  377.         /*
  378.          * Set attributes:
  379.          *
  380.          *      border - blue/white box
  381.          *      window - white background/black letters
  382.          *
  383.         */
  384.  
  385.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  386.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  387.  
  388.         /*
  389.          * Open window at 0,0 - 25 cells wide and 10 cells high
  390.         */
  391.  
  392.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  393.           if(!w1) exit();       
  394.  
  395.         /*
  396.          * Print the famous string, prompt and fetch a name, 
  397.          * wait for key to be struck.
  398.          * Close window on key strike.. exit.
  399.         */
  400.  
  401.           wn_printf(w1,"Hello World...");
  402.  
  403.           *name = NUL;                  /* init buffer for name */
  404.           wn_gtext(XEQ,NFRM,NFLD,w1,2,1,"Name: ",watrib,'_',15,name,NSTR,NSTR);
  405.  
  406.           v_getch();                    /* wait for key */
  407.           wn_close(w1);                 /* close the window */
  408.           exit(0);                      /* and exit */
  409.         }
  410.  
  411.         /* End */
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.                                                            Page: 6
  422.                                                      The Window BOSS
  423.  
  424.  
  425.  
  426.         4.3. Form Basics
  427.  
  428.         Now we will expand a bit further to read a 2 field form.
  429.  
  430.         #include "winboss.h"            /* REQUIRED */
  431.         main()
  432.         {
  433.         WINDOWPTR w1;                   /* window handle */
  434.         WIFORM f1;                      /* form handle */
  435.         int batrib;                     /* border atrib */
  436.         int watrib;                     /* window atrib */
  437.         char name[15];                  /* name */
  438.         char city[15];                  /* city */
  439.  
  440.         /*
  441.          * Set attributes:
  442.          *
  443.          *      border - blue/white box
  444.          *      window - white background/black letters
  445.          *
  446.         */
  447.  
  448.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  449.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  450.  
  451.         /*
  452.          * Open window at 0,0 - 25 cells wide and 10 cells high
  453.         */
  454.  
  455.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  456.           if(!w1) exit();       
  457.  
  458.         /*
  459.          * Print the famous string, create, define, and fetch form
  460.          * wait for key to be struck.
  461.          * Close window on key strike.. exit.
  462.         */
  463.  
  464.           wn_printf(w1,"Hello World...");
  465.  
  466.           *name = NUL;                  /* init buffer for name */
  467.           *city = NUL;                  /* init buffer for city */
  468.           f1 = wn_frmopn(3);            /* open form 2 + 1 Fields */
  469.           wn_gtext(SET,f1,0,w1,2,1,"Name: ",watrib,'_',15,name,NSTR,NSTR);
  470.           wn_gtext(SET,f1,1,w1,3,1,"City: ",watrib,'_',15,city,NSTR,NSTR);
  471.           wn_frmget(f1);                /* read the form */
  472.  
  473.           v_getch();                    /* wait for key */
  474.           wn_frmcls(f1);                /* first close the form */
  475.           wn_close(w1);                 /* then close the window */
  476.           exit(0);                      /* and exit */
  477.         }
  478.  
  479.  
  480.  
  481.  
  482.                                                            Page: 7
  483.                                                      The Window BOSS
  484.  
  485.  
  486.  
  487.         4.4. Popup Menu Basics
  488.  
  489.         Popup and pulldown menus add that extra sparkle to your 
  490.         applications.  The Window BOSS includes a simple popup menu 
  491.         system that is fast and easy to use.  The system consists of two 
  492.         functions; wn_popup() and wn_qpopup().  wn_popup() is an 
  493.         interactive version of wn_qpopup().  That is to say that 
  494.         wn_popup() can be used to solicit user input while wn_qpopup is a 
  495.         *information only* popup.  The "q" in qpopup stands for 'quick'.  
  496.         Both functions have function parameters and require the menu 
  497.         structure "pmenu" to be initialized.  "pmenu" is defined in 
  498.         "winboss.h".
  499.  
  500.         Popup menus, like windows, have size (height & width), an origin 
  501.         (row & column), and attributes (text & border).  These are passed 
  502.         as parameters to both wn_popup and wn_qpopup in the same fashion 
  503.         as they would be for a call to wn_open.  In addition to the 
  504.         normal window stuff, popup menus also have information that needs 
  505.         to be displayed and, in some cases, information that needs to be 
  506.         returned, to the calling function.  This additional information 
  507.         is passed to popup via the pmenu structure.  The pmenu structure 
  508.         allows us to tell wn_popup what text is to be displayed where, 
  509.         and what value (return code), if any, is to be provided back to 
  510.         the calling function.
  511.  
  512.         Both wn_popup and wn_qpopup call wn_open to open a window defined 
  513.         by the calling parameters. Calls to wn_putsa are then made to 
  514.         display the text defined in pmenu within the window just opened 
  515.         at the location in the window specified by the values defined in 
  516.         pmenu.  A menu item is highlighted by moving either the cursor 
  517.         keys, space bar, or by pressing the first character of the menu 
  518.         item desired.  Control is passed back to the calling function 
  519.         when the 'Enter' or 'Escape' key is pressed. Here is a typical 
  520.         call to wn_popup:
  521.  
  522.             wat = (WHITE<<4|BLACK);
  523.             bat = (BLUE<<4|WHITE); 
  524.             rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, FALSE);
  525.                           |                       |  |     |  |   |
  526.                           +-------\/--------------+  |     |  |   |
  527.                              Normal wn_open parms    |     |  |   |
  528.                                                      |     |  |   |
  529.                                   pmenu structure  <-+-----+  |   |
  530.                                                               |   |
  531.                                         window close flag   <-+---+
  532.  
  533.         The normal wn_open parameters define the popup menu's location, 
  534.         size, and color.  The pmenu structure address allows wn_popup and 
  535.         wn_qpopup to access the contents of the intelc pmenu structure.  
  536.         The window close flag is used to tell wn_popup whether or not to 
  537.         close the popup menu when returning to the calling function. 
  538.         Telling wn_popup not to close the menu when returning to the 
  539.         calling function allows you to create nested popups.
  540.  
  541.  
  542.  
  543.                                                            Page: 8
  544.                                                      The Window BOSS
  545.  
  546.  
  547.  
  548.         Popup Menu Basics - continued.
  549.  
  550.  
  551.  
  552.         Lets examine the pmenu structure definition from winboss.h:
  553.  
  554.           struct mitem {              /* POPUP menu item template */
  555.             int r;                    /* row */
  556.             int c;                    /* col */
  557.             char *t;                  /* text */
  558.             int rv;                   /* return value */
  559.           };
  560.  
  561.           struct pmenu {              /* POPUP menu structure */
  562.             WINDOWPTR wpsave;         /* place to hold window id */
  563.             int winopn;               /* leave window open flag */
  564.             int lndx;                 /* last index */
  565.             int fm;                   /* first menu item index */
  566.             int lm;                   /* last menu item index */
  567.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  568.           };                          /* NOTE RELATIVE LIMIT */
  569.  
  570.           mitem - Popup menus contain a number of menu items. Each menu 
  571.           item has a location (within the window), text (to be displayed 
  572.           in the window), and an integer return code that is passed back 
  573.           to the calling function to let the caller know which menu item 
  574.           was selected.  "r" and "c" define the row and column, "t" is a 
  575.           pointer to the text, and rv is integer return code.
  576.              
  577.           pmenu - In addition to the information needed about each menu 
  578.           item, we need to do some internal housekeeping on the popup 
  579.           menu itself.  "wpsave" is used to store the WINDOWPTR that was 
  580.           returned from the call to wn_open made by popup. "winopn" is 
  581.           used internally by popup as an indicator of whether or not the 
  582.           window referenced by wpsave is currently open.  "lndx" is used 
  583.           internally to hold the index of the menu item last referenced 
  584.           or selected.  The combination of "wpsave", "winopn", and "lndx" 
  585.           provide wn_popup with the ability to correctly handle both 
  586.           nested and non-nested popups.  The structure members "wpsave", 
  587.           "winopn", "lndx" should not be modified, only initialized. 
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.                                                            Page: 9
  605.                                                      The Window BOSS
  606.  
  607.  
  608.  
  609.         Popup Menu Basics - continued.
  610.  
  611.  
  612.  
  613.           The Window BOSS's popup menus allow you to have informational 
  614.           headers and trailers.  This is handy for providing multiple 
  615.           line titles and or trailing instructional messages.  Consider 
  616.           the following:
  617.  
  618.              +---------------------------------+
  619.              |                                 |
  620.              |           Intellicom            |   <- Informational
  621.              |          Quick - Help           |   <- Informational
  622.              |                                 |
  623.              |     1 General Information       |   <- Action item
  624.              |     2 Terminal Mode Options     |   <- Action item
  625.              |     3 XMODEM File Send          |   <- Action item
  626.              |     4 XMODEM File Receive       |   <- Action item
  627.              |     5 CompuServe Exec Mode      |   <- Action item  
  628.              |                                 |
  629.              |  Press: ESC to quit or Cursor   |   <- Informational
  630.              |   Keys to Position Cursor then  |   <- Informational 
  631.              |   press RETURN for MORE info.   |   <- Informational
  632.              |                                 |
  633.              +---------------------------------+
  634.  
  635.           In the above popup there are 10 menu items, 5 are action 
  636.           oriented, and 5 are informational.  They are numbered 0 through 
  637.           9 and correspond to the "scrn" array of pointers in the pmenu 
  638.           structure. "fm" and "lm" are the indexes of the first and last 
  639.           action items in scrn array.  In the case of the above popup, fm 
  640.           and lm would be initialized to 2 and 6 respectively. "fm" and 
  641.           "lm", like the other housekeeping structure members, should not 
  642.           be modified, only initialized.  The pmenu structure for this 
  643.           popup is as follows: 
  644.  
  645.           static struct pmenu intelc = {
  646.             0, FALSE, 0,                     /* wpsave, winopn, lndx */
  647.              2, 6, {                         /* fm, lm */
  648.              1, 2, "         Intellicom", 0,            /** ----- **/
  649.              2, 2, "        Quick - Help", 0,           /*    |    */ 
  650.              4, 5, "1 General Information  ", 1,        /*    |    */
  651.              5, 5, "2 Terminal Mode Options", 2,        /*    |    */
  652.              6, 5, "3 XMODEM File Send     ", 3,        /* 10 menu */
  653.              7, 5, "4 XMODEM File Receive  ", 4,        /*  items  */
  654.              8, 5, "5 CompuServe Exec Mode ", 5,        /*         */
  655.             10, 2, "Press: ESC to quit or Cursor", 0,   /*         */
  656.             11, 2, " Keys to Position Cursor then", 0,  /*         */
  657.             12, 2, " press RETURN for MORE info.", 0,   /** ----- **/
  658.             99, 99, "",99 }                 /* ALWAYS ADD THIS LINE */
  659.           };
  660.           
  661.  
  662.  
  663.  
  664.  
  665.                                                            Page: 10
  666.                                                      The Window BOSS
  667.  
  668.  
  669.  
  670.         Popup Menu Basics - continued.
  671.  
  672.  
  673.  
  674.         The end of the pmenu structure is designated by defining a menu 
  675.         item at row 99, column 99, with null text, with a return code of 
  676.         99.  THIS MUST ALWAYS BE DONE!
  677.  
  678.           Example:
  679.              
  680.              #include "winboss.h"
  681.  
  682.              static struct pmenu intelc = {
  683.                0, FALSE, 0,
  684.                2, 6, {
  685.                1, 2, "         Intellicom", 0,
  686.                2, 2, "        Quick - Help", 0,
  687.                4, 5, "1 General Information  ", 1,
  688.                5, 5, "2 Terminal Mode Options", 2,
  689.                6, 5, "3 XMODEM File Send     ", 3,
  690.                7, 5, "4 XMODEM File Receive  ", 4,
  691.                8, 5, "5 CompuServe Exec Mode ", 5,
  692.               10, 2, "Press: ESC to quit or Cursor", 0,
  693.               11, 2, " Keys to Position Cursor then", 0,
  694.               12, 2, " press RETURN for MORE info.", 0,
  695.               99, 99, "",99 }
  696.              };
  697.             
  698.              main()
  699.              {
  700.              WINDOWPTR w1;
  701.              int wat, bat, rv;
  702.  
  703.                wn_init();
  704.                w1 = wn_open(0,11,1,31,2,NORMAL,NORMAL);
  705.                if(!w1) exit(1);
  706.                wat = (WHITE<<4|BLACK);
  707.                bat = (BLUE<<4|WHITE); 
  708.                rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, FALSE);
  709.                wn_printf(w1, "wn_popup returned: %d\n",rv);
  710.                wn_printf(w1, "Press any key to continue..");
  711.                v_getch();
  712.                wn_close(w1);
  713.                wn_exit();
  714.                exit(0);
  715.              }
  716.              /* End */
  717.  
  718.           To make the popup menu disappear upon return, change the call 
  719.           to wn_popup to be:
  720.  
  721.                rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, TRUE);
  722.  
  723.  
  724.  
  725.  
  726.                                                            Page: 11
  727.                                                      The Window BOSS
  728.  
  729.  
  730.  
  731.         Popup Menu Basics - continued.
  732.  
  733.  
  734.  
  735.         The calling sequence and setup of wn_qpopup is similar to 
  736.         wn_popup but the functions significantly differ operationally.  
  737.         The parameter list differs in that there is no window close flag 
  738.         parameter.  The operational differences are more significant. 
  739.         wn_qpopup places the popup window on the screen and then 
  740.         immediately returns a WINDOWPTR to the open and active popup 
  741.         window.  The calling function assumes full responsibility for  
  742.         the window from then on (i.e. moving, closing, etc.).
  743.  
  744.         Quick popups are used to display information only and do not 
  745.         contain action menu items.  
  746.  
  747.         Example:
  748.  
  749.              #include "winboss.h"
  750.  
  751.              static struct pmenu m1 = {
  752.                0, FALSE, 0,
  753.                0, 0, {
  754.                1, 2, "Presenting", 0,
  755.                99, 99, "",99 }
  756.              };
  757.  
  758.              main()
  759.              {
  760.              int wat, bat;
  761.              WINDOWPTR w2;
  762.  
  763.                wat = (WHITE<<4|BLACK);
  764.                bat = (BLUE<<4|WHITE);
  765.                w2 = wn_qpopup(0,0,0,16,3,wat,bat,&m1);
  766.                v_getch();
  767.                wn_close(w2);
  768.                wn_exit();
  769.                exit();
  770.              }
  771.              /* End */
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.                                                            Page: 12
  788.                                                      The Window BOSS
  789.  
  790.  
  791.  
  792.         Popup Menu Basics - continued.
  793.  
  794.  
  795.  
  796.         4.4.1. Notes
  797.  
  798.         Popup menu items are highlighted by moving the cursor bar with 
  799.         the arrow keys, space bar, or by pressing the first letter/digit 
  800.         of the menu item.  wn_popup will return as soon as the Enter or 
  801.         Escape key is struck.  The return code specified in the pmenu 
  802.         structure is returned when the Enter key is pressed, Escape 
  803.         causes return code of 99 to be passed back to the calling 
  804.         function. 
  805.  
  806.         Menu navigation is from the current to next or current to 
  807.         previous menu item when using the cursor keys or space bar.  Item 
  808.         skipping can only be accomplished by using the "first character" 
  809.         selection method.  Skip selection will only work as anticipated, 
  810.         if the first character of each action menu item is unique.
  811.  
  812.         Source code is provided (WN_HELP.C) to allow you to customize 
  813.         and/or enhance the popup menu system to meet your needs.
  814.  
  815.         The BOSSDEMO program contains coding samples showing the use of 
  816.         wn_popup, wn_qpopup, and how to implement pulldown menus using 
  817.         wn_popup.
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.                                                            Page: 13
  849.                                                      The Window BOSS
  850.  
  851.  
  852.  
  853.         4.5. Help System Basics
  854.  
  855.         The Window BOSS includes a file based help system that can be 
  856.         used to provide your applications with "context sensitive" help.  
  857.  
  858.         It would be helpful for you to print out a few pages of 
  859.         "INTELC.HLP" to refer to during the following discussion.  You 
  860.         should also run the BOSSDEMO program and exercise the Intellicom 
  861.         Quick Help popup menu. This code uses the help system to produce 
  862.         the displays when menu selections are made.
  863.  
  864.         The system uses plain ASCII text files you create with your 
  865.         favorite editor.  A special, but easy to follow, file layout is 
  866.         used.  The file layout we have chosen allows the plain ASCII text 
  867.         files to be indexed using the supplied index generation utility 
  868.         GENINDEX.  The indexing provides the system with the ability to 
  869.         rapidly locate and display help messages when called upon to do 
  870.         so.  Since the source (WN_HELP.C & GENINDEX.C) to the entire help 
  871.         system is provided, you can modify it to meet your own needs.  
  872.  
  873.         In order to use the help system in your application you must take 
  874.         two preparatory steps: (1) prepare the ASCII text file in the 
  875.         specified format and (2) run the GENINDEX program.  For example, 
  876.         you first create a text file called "TAXES.HLP" using Brief, 
  877.         Vedit, Edlin, or your favorite word processor in non_document 
  878.         (ASCII) mode and then run the GENINDEX program by:
  879.  
  880.                             C> GENINDEX TAXES.HLP
  881.  
  882.         The GENINDEX program reads "TAXES.HLP" and produces "TAXES.NDX".  
  883.         Both "TAXES.HLP" and "TAXES.NDX" must be available to the 
  884.         application program at run time.
  885.  
  886.         To actually use the help system in your application you must 
  887.         first initialize the help system by calling wn_hlinit.  This 
  888.         must be done before any attempt is made to display help messages.
  889.         The help system must only be initialized once.  The call to 
  890.         initialize the help system is of the form:
  891.  
  892.              .....                              /* code */
  893.           rv = wn_hlinit(row, col, width, height, atrib, batrib, file)
  894.              .....                              /* code */
  895.  
  896.         The parameters define the location, size, and attributes of the 
  897.         window in which the help messages will be displayed, along with 
  898.         the name of the help file to be used.  wn_hlinit returns TRUE if 
  899.         all is well, FALSE otherwise.
  900.  
  901.         Initialization does not cause a window to be displayed, it merely 
  902.         sets the system up for later use by opening and reading the index 
  903.         file into memory.
  904.  
  905.  
  906.  
  907.  
  908.  
  909.                                                            Page: 14
  910.                                                      The Window BOSS
  911.  
  912.  
  913.  
  914.         Help System Basics - continued.
  915.  
  916.  
  917.  
  918.         To initialize the system for full screen help messages in a 
  919.         window with white letters on blue background and a similar border 
  920.         using the file "INTELC.HLP", the call to wn_hlinit would be:
  921.  
  922.          wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),"intelc");
  923.  
  924.         The help system is now initialized to display full screen help 
  925.         messages using "INTELC.HLP" and "INTELC.NDX" as the help message 
  926.         database. (The BOSSDEMO program uses the above code.)
  927.  
  928.         Important - Unless you intend to modify the help system, the 
  929.         above call to wn_hlinit should always be used - modified only to 
  930.         reflect the name of your help file. 
  931.  
  932.         Obtaining help at run time is accomplished by calling the wn_help 
  933.         function with a subject key word.  For example:
  934.  
  935.              rv = wn_help("%general information%");
  936.  
  937.         Subject key words are located in the ASCII help file you prepare 
  938.         and are processed by the GENINDEX program.  The usage of 
  939.         wn_help() should be clear once we complete the discussion of the 
  940.         file layout.
  941.  
  942.         The text file you prepare consists of help system commands, 
  943.         subject key words, and the actual text to be displayed which is 
  944.         formatted to fit inside the window defined by wn_hlinit.  
  945.  
  946.         Commands 
  947.  
  948.           .cp   - signals end of page 
  949.           *END* - signals end of page and end of help for this subject
  950.  
  951.           Text is sequentially displayed one screen at a time from the 
  952.           subject keyword through any number of .cp delimited screens 
  953.           through and including the screen delimited by *END*.  The 
  954.           system allows for forward and reverse display via the PgDn and 
  955.           PgUp keys.  The .cp signals the end of a single screen in a 
  956.           series of 2 or more screens.  When .cp is detected the message  
  957.           "Esc to quit help, PgUp for previous screen, any other key to 
  958.           continue..." will be displayed.  When *END* is detected, the 
  959.           message "End of help, PgUp for previous screen, any other key 
  960.           to continue..." is displayed.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.                                                            Page: 15
  971.                                                      The Window BOSS
  972.  
  973.  
  974.  
  975.         Help System Basics - continued.
  976.  
  977.  
  978.  
  979.         Keywords:
  980.  
  981.           Keywords are always enclosed within percent signs (%) and 
  982.           signal the beginning of text on a particular subject.  They are 
  983.           used by the GENINDEX program to create the index (NDX) file and 
  984.           are used by you as parameters to the wn_help() function.
  985.  
  986.           In the case of "INTELC.HLP" you will find the following 
  987.           keywords:
  988.  
  989.           %ksend%, %ksend1%, %krecv%, %krecv1%, %checksum xmit1%, 
  990.           %checksum recv1%, %terminal/c1%, %cistty1%, %terminal%, 
  991.           %terminal/c%, %cistty%, %status%, %dos window%, %exit to dos%,
  992.           %close capture%, %autodial%, %ascii xmit%, %checksum xmit%,
  993.           %checksum recv%, %general information%, %bossinfo%, 
  994.           %end-of-file%
  995.  
  996.         Text:
  997.              
  998.           Each screen of text is delimited by either a keyword, the .cp 
  999.           command, or the *END* command.  Text is always formatted to fit 
  1000.           inside the help window.  In the case of "INTELC.HLP" there are 
  1001.           two leading spaces and the text is right justified to end at 
  1002.           column 76.  The two leading and trailing spaces center the text 
  1003.           between the borders.  Blank lines at the top of each screen 
  1004.           (page full) can be used to vertically center the text.  Spaces 
  1005.           on the left can be used to horizontally center text.
  1006.  
  1007.           Important - Unless you intend to modify the help system, the 
  1008.           format defined by "INTELC.HLP" should always be followed for 
  1009.           any help files you create for your own use.
  1010.  
  1011.         4.5.1. Notes
  1012.  
  1013.           The help system is configured to provide a full screen text 
  1014.           message, subject keys are limited to 25 characters, and there 
  1015.           is a limit of 255 subject keys per file.  This can be changed 
  1016.           by modifying the functions found in "wn_help.c"  THERE IS A 
  1017.           DIRECT CORRELATION BETWEEN THE PARAMETERS USED TO INITIALIZE 
  1018.           THE HELP SYSTEM AND THE LAYOUT OF THE ASCII TEXT FILE READ BY 
  1019.           THE GENINDEX PROGRAM.  If you modify the code be sure to also 
  1020.           modify location and text of the messages to be displayed when 
  1021.           .cp and/or *END* are detected.
  1022.          
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.                                                            Page: 16
  1032.                                                      The Window BOSS
  1033.  
  1034.  
  1035.  
  1036.         Help System Basics - continued.
  1037.  
  1038.  
  1039.  
  1040.           The GENINDEX program is provided in source form.  An EXEcutable 
  1041.           will have to be created locally.  You may also have to adjust 
  1042.           the logic to account for the way the various compilers treat 
  1043.           <CR><LF> sequences.  This usually amounts to nothing more than 
  1044.           changing the "rb" to "r" in the fopen statement.  The best way 
  1045.           to determine if you have built a properly functioning GENINDEX 
  1046.           program is to run your newly created GENINDEX program against 
  1047.           "INTELC.HLP" to create a new "INTELC.NDX".  Then rebuild the 
  1048.           BOSSDEMO program and test to see if the Intellicom Quick Help 
  1049.           popup is functioning properly.  If it is, you are all set.  If 
  1050.           you receive a "Sorry - No info on... " message, then you will 
  1051.           need to edit GENINDEX to make the "rb"/"r" change.  
  1052.  
  1053.           This help system has nothing in common with the way in which 
  1054.           the data entry help and error messages get displayed.
  1055.  
  1056.           Help files always have a filename extension of "HLP".  Index 
  1057.           files always have a filename extension of "NDX".
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.                                                            Page: 17
  1093.                                                      The Window BOSS
  1094.  
  1095.  
  1096.  
  1097.         Help System Basics - continued.
  1098.  
  1099.  
  1100.  
  1101.         Here is a sample program that uses INTELC.HLP.
  1102.  
  1103.              #include "winboss.h"
  1104.              main()
  1105.              {
  1106.              WINDOWPTR w1;                   /* window handle */
  1107.              int batrib;                     /* border atrib */
  1108.              int watrib;                     /* window atrib */
  1109.  
  1110.                wn_init();
  1111.                batrib = BLUE<<4 | WHITE;
  1112.                watrib = WHITE<<4 | BLACK;
  1113.                w1 = wn_open(0,0,0,25,10,watrib,batrib);
  1114.                if(!w1) exit(1);
  1115.  
  1116.                wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),"intelc");
  1117.  
  1118.                wn_printf(w1, "Press any key\n"); v_getch();
  1119.                wn_help("%ksend%");
  1120.                wn_printf(w1, "Press any key\n"); v_getch();
  1121.                wn_help("%ksend1%");
  1122.                wn_printf(w1, "Press any key\n"); v_getch();
  1123.                wn_help("%krecv%");
  1124.                wn_printf(w1, "Press any key\n"); v_getch();
  1125.                wn_help("%krecv1%");
  1126.                wn_printf(w1, "Press any key\n"); v_getch();
  1127.                wn_help("%checksum xmit1%");
  1128.  
  1129.                wn_printf(w1, "Press any key\n"); v_getch();
  1130.                wn_close(w1);
  1131.                wn_exit();
  1132.                exit(0);
  1133.              }
  1134.  
  1135.              /* End */
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.                                                            Page: 18
  1154.                                                      The Window BOSS
  1155.  
  1156.  
  1157.  
  1158.         4.6. Mouse Basics
  1159.  
  1160.         The Window BOSS includes a collection of routines that provide 
  1161.         the building blocks for developing applications that incorporate 
  1162.         Mouse support.  As a programmer you will need following:
  1163.  
  1164.              . The mouse and its associated hardware
  1165.  
  1166.              . The mouse driver software
  1167.  
  1168.              . C and/or Assembly level functions to communicate with the 
  1169.                mouse
  1170.  
  1171.         The first two are provided by the mouse manufacturer and must be 
  1172.         installed as outlined in the manufacturer's literature.  The last 
  1173.         item is provided as part of The Window BOSS. The Window BOSS's 
  1174.         mouse functions adhere to the de facto Microsoft standard. 
  1175.         However, all of the routines have been extensively tested with 
  1176.         both Microsoft and Logitech mice.
  1177.  
  1178.         Mouse Communication
  1179.  
  1180.         The only practical method of communicating with the mouse is 
  1181.         through the mouse device driver, which is accessible via software 
  1182.         interrupt 33H.  This interrupt is not used by DOS and is claimed 
  1183.         by the mouse device driver at its invocation.  Information is 
  1184.         exchanged between the mouse device driver and calling software 
  1185.         via the standard 8086/88 registers. As a Window BOSS user you 
  1186.         will be pleased to know that the burden of having to deal with 
  1187.         the mouse at this level has been replaced by a collection of "C" 
  1188.         level routines that handle all of the aforementioned setup, 
  1189.         software interrupts and register loading/unloading!!
  1190.  
  1191.         Mouse Usage
  1192.  
  1193.         Once the mouse has been initialized (reset), you can show it, 
  1194.         hide it, move it, ask it where it is, check to see if its buttons 
  1195.         have been pressed or released, make it emulate a light pen, put a 
  1196.         cage around it (set its region), define its shape and associated 
  1197.         attribute, or ask it how many buttons it has!
  1198.  
  1199.         Mouse Functions
  1200.  
  1201.         The standard Microsoft mouse supports 16 functions. Logitech's 
  1202.         are the same, although some are tweaked a tad to handle the 3rd 
  1203.         button.  The Window BOSS provides an easy to use interface to the 
  1204.         low level mouse functions and several higher level functions to 
  1205.         ease your applications level programming.
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.                                                            Page: 19
  1215.                                                      The Window BOSS
  1216.  
  1217.  
  1218.  
  1219.         Mouse Basics - continued.
  1220.  
  1221.  
  1222.  
  1223.         Mouse Functions - continued.
  1224.  
  1225.         The following table summarizes the 16 Microsoft Mouse Functions:
  1226.  
  1227.              Function       Description              Window BOSS Function
  1228.                 0           Initialize mouse         mo_reset()
  1229.                 1           Show mouse               mo_show()
  1230.                 2           Hide mouse cursor        mo_hide()
  1231.                 3           Get position & status    mo_pos()
  1232.                 4           Set mouse position       mo_move()
  1233.                 5           Get button press info    mo_pbinfo()
  1234.                 6           Get button release info  mo_rbinfo()
  1235.                 7           Set min/max columns      mo_clim()
  1236.                 8           Set min/max rows         mo_rlim()
  1237.                 9 *         Define graphics pointer  mo_sgcursor()
  1238.                10           Define text pointer      mo_scursor()
  1239.                11           Read motion counters     mo_motion()
  1240.                12 *         Define event handler     mo_task()
  1241.                13           Light pen emulation on   mo_lpon()
  1242.                14           Light pen emulation off  mo_lpoff()
  1243.                15 *         Set motion pixel ratio   mo_ratio()
  1244.  
  1245.         In addition to the above low level interface routines, the 
  1246.         following application's level functions have been implemented to 
  1247.         ease the mouse's natural display adapter sensitivity.  Without 
  1248.         these routines, mouse applications would have to deal with the 
  1249.         mouse in a 640x200-pixel plane - even in text mode!
  1250.  
  1251.              mo_rcpos()     Return current mouse position (row, col)
  1252.              mo_locate()    Locate mouse (row, col)
  1253.              mo_press()     Get button pressed info (button, location..)
  1254.              mo_release()   Get button released info ( " " " " " " " " )
  1255.              mo_region()    Set mouse hot area (row, col, width, height)
  1256.              mo_setptr()    Set mouse pointer (style, attributes)
  1257.              mo_wait()      Wait for mouse to settle (de bouncing logic)
  1258.              mo_nbut()      Return # of buttons on mouse
  1259.  
  1260.         Most mouse applications will use and generally only need to use: 
  1261.         mo_reset(), mo_show(), mo_hide(), and most or all of the 
  1262.         application level functions.  
  1263.  
  1264.         The low level functions are provided for those who prefer to deal 
  1265.         with the mouse on its 640 x 200 pixel plane.
  1266.  
  1267.         All of the above supported functions are documented in the 
  1268.         FUNCTION CALL SYNOPSIS section of this manual.
  1269.  
  1270.         * Interfaces to these functions are provided, but are not 
  1271.         supported, by Star Guidance. 
  1272.  
  1273.  
  1274.  
  1275.                                                            Page: 20
  1276.                                                      The Window BOSS
  1277.  
  1278.  
  1279.  
  1280.         Mouse Basics - continued.
  1281.  
  1282.  
  1283.  
  1284.         Mouse Programming Example (Basic)
  1285.  
  1286.         #include "winboss.h"                    /* ALWAYS */
  1287.  
  1288.         main()
  1289.         {
  1290.         MOUSEPTR m1;                            /* my mouse ptr */
  1291.         int mstat, mclik, mrow, mcol;           /* mouse stuff */
  1292.         int i;                                  /* scratch */
  1293.  
  1294.           v_cls(NORMAL);                        /* clear the screen */
  1295.           v_locate(0,0,0);                      /* locate the cursor */
  1296.  
  1297.           m1 = mo_reset();                      /* init mouse */
  1298.  
  1299.           if(m1) {                              /* mouse exists */
  1300.             printf("Mouse exists with %d buttons.\n", mo_nbutt(m1));
  1301.             mo_setptr(m1, 0x1E, NORMAL);        /* set mouse pointer style */
  1302.             mo_reigon(m1, 0, 0, 80, 25);        /* set mouse "window" */
  1303.             mo_show(m1);                        /* show the critter */
  1304.  
  1305.             v_locate(0,5,0);
  1306.             printf("Roll test... move mouse, click left or right to end.\n");
  1307.             do {                                /* rolling test */
  1308.               mo_rcpos(m1, &mstat, &mrow, &mcol);
  1309.               v_locate(0,6,0);
  1310.               printf("Mouse @ %03d,%03d", mrow, mcol);
  1311.             } while (!mstat);
  1312.  
  1313.             v_cls(NORMAL);                      /* clear screen */
  1314.             v_locate(0,0,0);                    /* home cursor */
  1315.             mo_hide(m1);                        /* hide mouse */
  1316.             m1 = mo_reset();                    /* reset mouse */
  1317.             exit(0);                            /* finito */
  1318.           }
  1319.           else {
  1320.             printf("NO MICE HERE!!\n");         /* tell of woe... */
  1321.             exit(0);                            /* exit */
  1322.           }
  1323.         }
  1324.  
  1325.         /* End */
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.                                                            Page: 21
  1337.                                                      The Window BOSS
  1338.  
  1339.  
  1340.  
  1341.         4.7. Important Concepts
  1342.  
  1343.         The preceding programming examples serve as the foundation for 
  1344.         some fundamental, but very important, concepts.  
  1345.  
  1346.         4.7.1. WINBOSS.H
  1347.  
  1348.         The Window BOSS requires the file "winboss.h" to be included in 
  1349.         any source code files that are going to reference any of the 
  1350.         windowing, data entry, or form control functions.  Take the time 
  1351.         to peruse this file as it contains all of the constants and 
  1352.         structures used by both The Window BOSS and Data Clerk.  
  1353.         Also, please note that WINBOSS.H includes other standard compiler 
  1354.         header files.
  1355.  
  1356.         4.7.2. Window Handles
  1357.  
  1358.         All windowing functions (any function beginning with "wn_") 
  1359.         either explicitly require an associated window pointer to work, 
  1360.         or assume one already is, or will be, created.  
  1361.  
  1362.         4.7.3. Mouse Handles
  1363.  
  1364.         All mouse functions (any function beginning with "mo_") 
  1365.         either explicitly require an associated mouse pointer to work, 
  1366.         or assume one already is, or will be, created.  
  1367.  
  1368.         4.7.4. Window Origin
  1369.  
  1370.         Windows have an origin relative to the upper left hand corner of 
  1371.         the screen which is always row 0, and column 0.
  1372.  
  1373.         4.7.5. Text and Data Field Origins
  1374.  
  1375.         Text and data fields have an origin relative to the upper left 
  1376.         hand corner of the window, which is always row 0, column 0.
  1377.  
  1378.         4.7.6. Attributes
  1379.  
  1380.         Attributes (foreground/background colors) must be specified for 
  1381.         windows, borders, and data entry fields.  Prompts for data entry 
  1382.         fields always have the same attributes as the window. The fields 
  1383.         themselves can have, but do not require, a different attribute 
  1384.         set.
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.                                                            Page: 22
  1398.                                                      The Window BOSS
  1399.  
  1400.  
  1401.  
  1402.         4.7.7. Fields and Forms
  1403.  
  1404.         Fields are defined by calling the field definition functions 
  1405.         (wn_gdate, wn_gtime, wn_gphone, ...) with "SET" as the function 
  1406.         code (1st arg), a valid form handle (2nd arg), a field sequence 
  1407.         number (3rd arg), and the window handle (4th arg) belonging to 
  1408.         the window in which the form is to be displayed.  The same 
  1409.         functions that are used to retrieve discrete information can be 
  1410.         combined to create a form when used in conjunction with 
  1411.         wn_frmopn() and wn_frmget().  Note the use of XEQ vs. SET, NFRM 
  1412.         vs. f1, and NFLD in the preceding two program examples.  XEQ 
  1413.         stands for "execute now", while SET stands for "set up for later 
  1414.         execution under wn_frmget()".
  1415.  
  1416.         Forms are anchored to a particular window and must be created by 
  1417.         wn_frmopn() and defined with field definition functions.
  1418.  
  1419.         Data entry fields can be edited, pre-filled, have validation 
  1420.         ranges, and have both help and error messages associated with 
  1421.         them.  
  1422.  
  1423.         4.7.8. Return Values
  1424.  
  1425.         Some functions return an indication of success or failure which 
  1426.         you can foolishly ignore, or check to determine what action to 
  1427.         take.
  1428.  
  1429.         4.7.9. Closing Forms and Windows
  1430.  
  1431.         Both forms and windows should be closed when they are no longer 
  1432.         needed.  Although you can close them in any order, it makes sense 
  1433.         to close all forms associated with a window before closing the 
  1434.         window itself.  As a side note - attempting to reference either 
  1435.         forms or windows which have been closed can lead to unpredictable 
  1436.         results.
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.                                                            Page: 23
  1459.                                                      The Window BOSS
  1460.  
  1461.  
  1462.  
  1463.         Important Concepts - continued.
  1464.  
  1465.  
  1466.  
  1467.         4.7.10. Overlapping Windows
  1468.  
  1469.         The Window BOSS fully supports the concept of overlapping 
  1470.         windows, that is to say that you can have several windows on the 
  1471.         screen at the same time and freely access any one of them without 
  1472.         having to be concerned with the order in which they were opened 
  1473.         or whether or not any other windows overlap the one you wish to 
  1474.         access.  The Window BOSS employs the "most recently used is 
  1475.         active" concept.  This concept is based on the following:
  1476.  
  1477.              . The last window referenced is the current active 
  1478.                window.  
  1479.  
  1480.              . The current active window is always the top window.
  1481.  
  1482.         For example, let us assume that you have opened three overlapping 
  1483.         windows in the following order; w1, w2, w3. w3 is considered to 
  1484.         be the top window because it was the last window referenced. If 
  1485.         you now reference, or explicitly activate w2, The Window BOSS 
  1486.         will automatically adjust the screen image to insure that w2 is 
  1487.         now the top window with w3 and w1 being partially hidden by w2.
  1488.  
  1489.                   Before                   After
  1490.  
  1491.                   +----------+             +----------+
  1492.                   |  W1      |             | W1       |
  1493.                   |  +----------+          |  +----------+
  1494.                   |  | W2       |          |  | W2       |
  1495.                   |  |  +------------+     |  |          |----+
  1496.                   |  |  | W3         |     |  |          | W3 |
  1497.                   |  |  |            |     |  |          |    |
  1498.                   |  |  +------------+     |  |          |----+
  1499.                   |  |          |          |  |          |
  1500.                   |  +----------+          |  +----------+
  1501.                   |          |             |          |
  1502.                   +----------+             +----------+
  1503.  
  1504.         It is extremely important to keep in mind that The Window BOSS 
  1505.         will automatically activate (bring to the top) the window being 
  1506.         referenced.  By keeping your screen layouts attractive and 
  1507.         uncluttered there will be a minimum of window thrashing which is 
  1508.         both annoying and time consuming.
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.                                                            Page: 24
  1520.                                                      The Window BOSS
  1521.  
  1522.  
  1523.  
  1524.         Important Concepts - continued.
  1525.  
  1526.  
  1527.  
  1528.         4.7.11. Functions
  1529.  
  1530.         The Window BOSS's functions fall into four major groups: those 
  1531.         that manipulate windows, those that deal with data entry, those 
  1532.         that deal with the mouse, and those that deal with the video or 
  1533.         keyboard interface at a relatively low level.  All window and 
  1534.         data manipulation functions begin with the prefix "wn_" as in 
  1535.         "wn_open".  All mouse functions begin with "mo_" as in 
  1536.         "mo_reset", while all video and keyboard based functions begin 
  1537.         with "v_" or "_" as in "v_getch" and "_putch".  This convention 
  1538.         makes it easy to remember where to look when you want to do 
  1539.         something.  Additionally, there are several global functions 
  1540.         which begin with "wns_".  These functions, although visible to 
  1541.         the outside world, are used internally by The Window BOSS. 
  1542.  
  1543.         So ends the tale of the basics, you are now ready to add sizzle, 
  1544.         bright lights, and artistic touches to all your applications!  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.                                                            Page: 25
  1581.                                                      The Window BOSS
  1582.  
  1583.  
  1584.  
  1585.         5. Distribution Methods & Media Kits 
  1586.  
  1587.         The Window BOSS is distributed on HIGH DENSITY diskettes.  There 
  1588.         are two media kits available: The Shareware diskette kit and The 
  1589.         Source diskette kit.  This doucument describes both media kits.  
  1590.         Neither media kit contains ALL of the files listed.
  1591.  
  1592.         The Shareware diskettes can be freely copied and shared.  The 
  1593.         Source diskettes cannot. In either case, you receive a bundled 
  1594.         product -- that is to say, we do not require you to order a 
  1595.         separate media kit for Microsoft, another for Borland, and so on.  
  1596.         All our products include support for all the compilers we 
  1597.         support. This makes moving from one compiler to another child's 
  1598.         play, and it also helps to protect your software development 
  1599.         investment, while at the same time saving you a significant sum 
  1600.         of money!
  1601.  
  1602.         5.1. CompuServe, GENIE, BIX, & Bulletin Board Files
  1603.  
  1604.         We always upload the latest release of shareware files to GENIE, 
  1605.         CompuServe, BIX, and selected BBS(s) around the country.  These 
  1606.         files can be found in the Vendor Support Software Library on the 
  1607.         IBM Round Table (M 616) of GENIE, in the "C" Language Section on 
  1608.         the IBM Programming Sig (GO IBMPRO) of CompuServe, and in the 
  1609.         "C.LANGUAGE" section of the "ibm.listings" on BIX. In all cases 
  1610.         we try to name the required files as BOSS01.LZH (code++), 
  1611.         BOSS2A.LZH & BOSS2B.LZH (libs), BOSS03.LZH (documentation).  
  1612.         Naturally, this naming convention is subject to the approval of 
  1613.         the respective service provider.  However, it is reasonable to 
  1614.         assume that the required files will always conform to a naming 
  1615.         convention that begins with "BOSS" or "BOS" and have the keyword 
  1616.         "windows" associated with them.  
  1617.  
  1618.         If you can not find The Window BOSS files on GENIE, BIX, or 
  1619.         CompuServe it may be due to a restructuring of the SIGs by the 
  1620.         respective service provider.  Try looking in the vendor support, 
  1621.         systems, or language areas of the SIGS.
  1622.  
  1623.         Bulletin Board files follow the same naming conventions as GENIE 
  1624.         and CompuServe files.  
  1625.  
  1626.         5.2. The SHAREWARE Distribution Diskette(s)
  1627.  
  1628.           The SHAREWARE diskette(s) contain the following files:
  1629.  
  1630.              LHARC.EXE           <- Archive utility
  1631.              LHAR.DOC            <- Archive utility documentation    
  1632.              BOSS_DOC.LZH        <- Window BOSS Documentation archive
  1633.              BOSS_SUP.LZH        <- Support archive (code, etc.)
  1634.              READ.ME             <- Important notes
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.                                                            Page: 26
  1642.                                                      The Window BOSS
  1643.  
  1644.  
  1645.  
  1646.         The Shareware Distribution Diskette - continued.
  1647.  
  1648.  
  1649.              BOSS_LB1.LZH        <- Library archive (Microsoft)
  1650.              BOSS_LB2.LZH        <- Library archive (Watcom)
  1651.              BOSS_LB3.LZH        <- Library archive (Mix Power C)
  1652.              BOSS_LB4.LZH        <- Library archive (Lattice)
  1653.              BOSS_LB5.LZH        <- Library archive (Borland)
  1654.              BOSS_LB6.LZH        <- Library archive (Zortech)
  1655.              BOSS_LB7.LZH        <- Library archive (TopSpeed)
  1656.  
  1657.            =============================================================  
  1658.  
  1659.              Contents of BOSS_DOC
  1660.  
  1661.                BOSS.MAN          <- This manual
  1662.                BOSS.TOC          <- Table of Contents
  1663.  
  1664.              Contents of BOSS_SUP
  1665.  
  1666.                TSS.BAT           <- Compiler Driver - TopSpeed C
  1667.                LCS6.BAT          <- Compiler Driver - Lattice 6.0
  1668.                MSC6.BAT          <- Compiler Driver - Microsoft C 6.X
  1669.                MSQC25.BAT        <- Compiler Driver - Quick C 2.5
  1670.                PCCM.BAT          <- Compiler Driver - Mix Power C (Med)
  1671.                PCCS.BAT          <- Compiler Driver - Mix Power C (Small)
  1672.                TCS.BAT           <- Compiler Driver - Borland Turbo C
  1673.                BCS.BAT           <- Compiler Driver - Borland C
  1674.                WOCS.BAT          <- Compiler Driver - Watcom C
  1675.                ZTCS.BAT          <- Compiler Driver - Zortech C
  1676.                LOADTS.BAT        <- Link Batch file - TopSpeed C
  1677.                LOADLC6.BAT       <- Link Batch file - Lattice 
  1678.                LOADMS6.BAT       <- Link Batch file - Microsoft C 
  1679.                LOADQC25.BAT      <- Link Batch file - Quick C 
  1680.                LOADPC.BAT        <- Link Batch file - Mix Power C
  1681.                LOADTC.BAT        <- Link Batch file - Borland Turbo C   
  1682.                LOADBC.BAT        <- Link Batch file - Borland C
  1683.                LOADWAT.BAT       <- Link Batch file - Watcom C
  1684.                LOADZTC.BAT       <- Link Batch file - Zortech C
  1685.                TSAP.PRJ          <- MAKE file       - TopSpeed C
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.                                                            Page: 27
  1703.                                                      The Window BOSS
  1704.  
  1705.  
  1706.  
  1707.         The Shareware Distribution Diskette - continued.
  1708.  
  1709.  
  1710.              Contents of BOSS_SUP - continued.
  1711.  
  1712.                BOSSDEMO.C        <- Source to BOSSDEMO
  1713.                BOSSDEMO.EXE      <- DEMO Program
  1714.                GENINDEX.C        <- Source to GENINDEX
  1715.                HELLO.C           <- The Classic...
  1716.                INTELC.HLP        <- Demo DATA file
  1717.                INTELC.NDX        <- Index for Demo DATA file
  1718.                REV.HST           <- Revision History
  1719.                REV.LEV           <- Revision Level
  1720.                SAMPLE.C          <- Data entry sample program
  1721.                WINBOSS.FN6       <- Function Prototype INCLUDE file
  1722.                WINBOSS.FNB       <- Function Prototype INCLUDE file 
  1723.                WINBOSS.FNZ       <- Function Prototype INCLUDE file
  1724.                WINBOSS.FNT       <- Function Prototype INCLUDE file
  1725.                WINBOSS.EXT       <- External Definition INCLUDE file
  1726.                WINBOSS.H         <- BOSS INCLUDE file
  1727.                WN_FRMGE.C        <- Data Entry form reader
  1728.                WN_GBOOL.C        <- Data Entry function (logical)
  1729.                WN_GDATE.C        <- Data Entry function (dates)
  1730.                WN_GDOUB.C        <- Data Entry function (double)
  1731.                WN_GEDAT.C        <- Data Entry function (dates, Europe)
  1732.                WN_GFLOA.C        <- Data Entry function (floats)
  1733.                WN_GPHON.C        <- Data Entry function (phone)
  1734.                WN_GTIME.C        <- Data Entry function (time)
  1735.                WN_GULON.C        <- Data Entry function (unsigned long)
  1736.                WN_GINT.C         <- Data Entry function (integer)
  1737.                WN_GLONG.C        <- Data Entry function (long)
  1738.                WN_GPWOR.C        <- Data Entry function (password)
  1739.                WN_GTEXT.C        <- Data Entry function (various text)
  1740.                WN_GUINT.C        <- Data Entry function (unsigned int)
  1741.                WN_GSSN.C         <- Data Entry function (social sec. #)
  1742.                WN_IEMSG.C        <- Data Entry error message handler
  1743.                WN_IHMSG.C        <- Data Entry help message hander
  1744.                WN_HELP.C         <- Help function source
  1745.                WN_POPUP.C        <- Popup function source
  1746.                WN_PUTS.C         <- Source to wn_puts()
  1747.  
  1748.              Contents of BOSS_LB1
  1749.  
  1750.                SMSC6.LIB         <- BOSS library - Microsoft C 6.X
  1751.                SMSQC25.LIB       <- BOSS library - Microsoft Quick C 2.X
  1752.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1753.  
  1754.              Contents of BOSS_LB2
  1755.  
  1756.                WATOC.LIB         <- BOSS library - Watcom C
  1757.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1758.                   
  1759.  
  1760.  
  1761.  
  1762.  
  1763.                                                            Page: 28
  1764.                                                      The Window BOSS
  1765.  
  1766.  
  1767.  
  1768.         The Shareware Distribution Diskette - continued.
  1769.  
  1770.  
  1771.              Contents of BOSS_LB3
  1772.  
  1773.                SWIN.MIX          <- BOSS library - Mix Power C (Small)
  1774.                MWIN.MIX          <- BOSS library - Mix Power C (Medium)
  1775.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1776.  
  1777.              Contents of BOSS_LB4
  1778.  
  1779.                SLAT6.LIB         <- BOSS library - Lattice C 6.0
  1780.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1781.  
  1782.              Contents of BOSS_LB5
  1783.  
  1784.                STC.LIB           <- BOSS library - Borland Turbo C++ 
  1785.                SBC.LIB           <- BOSS Library - Borland C++ 
  1786.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1787.  
  1788.              Contents of BOSS_LB6
  1789.  
  1790.                ZTECH.LIB         <- BOSS library - Zortech 
  1791.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1792.              
  1793.              Contents of BOSS_LB7
  1794.              
  1795.                TSC.LIB           <- BOSS library - TopSpeed C 
  1796.                WINBOSS.FNS       <- Function Prototype INCLUDE File
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.                                                            Page: 29
  1825.                                                      The Window BOSS
  1826.  
  1827.  
  1828.  
  1829.         5.3. The SOURCE Distribution Diskette(s)
  1830.  
  1831.          The SOURCE diskette(s) contain the following files:
  1832.  
  1833.              LHARC.DOC           <- Documentation for ARC.EXE
  1834.              LHARC.EXE           <- Archive utility
  1835.              DOC.LZH             <- Manual 
  1836.              DEMO.LZH            <- DEMO program & data files 
  1837.              READ.ME             <- Important notes
  1838.              REVHST.LZH          <- Revision History 
  1839.              REV.LEV             <- Revision Level 
  1840.  
  1841.              CFILES.LZH          <- Source to all "C" modules
  1842.              ASMFILES.LZH        <- Source to all "Assembly" modules
  1843.  
  1844.              MS6.LZH             <- Microsoft C 6.X Specific files
  1845.              MSQC25.LZH          <- Microsoft Quick C 2.5 Specific files
  1846.              BCPP.LZH            <- Borland C++ Specific files
  1847.              TCPP.LZH            <- Borland Turbo C++  Specfic files
  1848.              WATCOM.LZH          <- Watcom Specific files
  1849.              LC6.LZH             <- Lattice Specific files
  1850.              MIX.LZH             <- Mix Power C Specific files
  1851.              TSC.LZH             <- TopSpeed C Specific files
  1852.              ZTC.LZH             <- Zortech C Specific files
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.                                                            Page: 30
  1886.                                                      The Window BOSS
  1887.  
  1888.  
  1889.  
  1890.         The SOURCE Distribution Diskette - continued.
  1891.              
  1892.  
  1893.  
  1894.              Contents of CFILES.LZH (C Source Files)
  1895.  
  1896.                BOSSDEMO.C        <- BOSSDEMO Source
  1897.                DOSINT.C          <- AZTEC compatibility module.
  1898.                GENINDEX.C        <- GENINDEX Source
  1899.                HELLO.C           <- The classic...
  1900.                SCANCODE.C        <- Quickie to display KB scancodes
  1901.                SAMPLE.C          <- Data entry sample program
  1902.                WINDOWS.C         <- Globals 
  1903.                WINBOSS.H         <- Window BOSS INCLUDE file
  1904.                WINBOSS.EXT       <- Window BOSS INCLUDE file 
  1905.                WN_ACTIV.C        <- Window activation, memory mgmt ++
  1906.                WN_BIOS.C         <- BIOS video functions
  1907.                WN_BOXSE.C        <- Set box drawing character set
  1908.                WN_CLOSE.C        <- Window Close
  1909.                WN_CLR.C          <- Clear window
  1910.                WN_CLRFN.C        <- Clear line, end of window
  1911.                WN_COLOR.C        <- Set window colors
  1912.                WN_DBORD.C        <- Draw window borders
  1913.                WN_DELRO.C        <- Delete row in window
  1914.                WN_DMA.C          <- Set video access mode
  1915.                WN_SCROL.C        <- Set window scrolling method
  1916.                WN_HELP.C         <- Help function source
  1917.                WN_POPUP.C        <- Popup menu source
  1918.                WN_INIT.C         <- Initialize window system
  1919.                WN_DMODE.C        <- Set window display mode
  1920.                WN_FIXCS.C        <- Fix physical cursor location
  1921.                WN_GETS.C         <- Get string with validation   
  1922.                WN_INSRO.C        <- Insert row in window
  1923.                WN_LOCAT.C        <- Locate cursor in window
  1924.                WN_MOVE.C         <- Move window
  1925.                WN_MOUSE.C        <- Mouse interface routines
  1926.                WN_NATRI.C        <- Set new attributes NOW
  1927.                WN_OPEN.C         <- Window open
  1928.                WN_PRINT.C        <- Window printf
  1929.                WN_PUTS.C         <- Put string in window
  1930.                WN_RESTO.C        <- Restore window image
  1931.                WN_SAVE.C         <- Save window image
  1932.                WN_STRING.C       <- String (char) functions
  1933.                WN_SUP.C          <- Internal support functions
  1934.                WN_SYNC.C         <- Set/Clear cursor sync
  1935.                WN_TITLE.C        <- Title window (BASIC)
  1936.                WM_STITLE.C       <- Title window (SUPER)
  1937.                WN_WRAP.C         <- Set/Clear text wrap
  1938.                WPRINTF.C         <- Alternate window printf
  1939.                WINBOSS.FNB       <- Prototype header
  1940.                WINBOSS.FN6       <- Prototype header
  1941.                WINBOSS.FNZ       <- Prototype header
  1942.                WINBOSS.FNT       <- Prototype header
  1943.  
  1944.  
  1945.  
  1946.                                                            Page: 31
  1947.                                                      The Window BOSS
  1948.  
  1949.  
  1950.  
  1951.         The SOURCE Distribution Diskette - continued.
  1952.              
  1953.  
  1954.  
  1955.              Contents of CFILES.LZH (C Source Files - continued.)
  1956.  
  1957.  
  1958.                WN_GDATE.C        <- Data entry - get date
  1959.                WN_GEDATE.C       <- Data entry - get date (Europe)
  1960.                WN_GDOUBLE.C      <- Data entry - get double
  1961.                WN_GTIME.C        <- Data entry - get time
  1962.                WN_GTEXT.C        <- Data entry - get text
  1963.                WN_GPHONE.C       <- Data entry - get phone #
  1964.                WN_GPWORD.C       <- Data entry - get password
  1965.                WN_GINT.C         <- Data entry - get integer
  1966.                WN_GUINT.C        <- Data entry - get unsigned integer
  1967.                WN_GULONG.C       <- Data entry - get unsigned long
  1968.                WN_GLONG.C        <- Data entry - get long
  1969.                WN_GFLOAT.C       <- Data entry - get float 
  1970.                WN_GBOOL.C        <- Data entry - get logical  
  1971.                WN_GSSN           <- Data entry - get social security #
  1972.                WN_DTEXT.C        <- Data entry - display text
  1973.                WN_FRMOPN.C       <- Data entry - FORM open
  1974.                WN_FRMGET.C       <- Data entry - FORM read
  1975.                WN_FRMCLS.C       <- Data entry - FORM close
  1976.                WN_INPUT.C        <- Data entry - common input 
  1977.                WN_IEMSG.C        <- Data entry - error msg handler
  1978.                WN_IHMSG.C        <- Data entry - help msg handler
  1979.            
  1980.              Contents of ASMFILES.LZH (ASM Source Files)
  1981.  
  1982.                MSVLIB.ASM        <- ASM routines for Microsoft, TopSpeed,
  1983.                                     and Zortech
  1984.                VLIB.ASM          <- ASM routines for Lattice 
  1985.                PCVLIB.ASM        <- ASM routines for Mix Power C
  1986.                                     Microsoft MASM format
  1987.                WCVLIB.ASM        <- ASM routines for WATCOM C
  1988.                TCVLIB.ASM        <- ASM routines for Borland C++ & Turbo C++
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.                                                            Page: 32
  2008.                                                      The Window BOSS
  2009.  
  2010.  
  2011.  
  2012.         The SOURCE Distribution Diskette - continued.
  2013.              
  2014.  
  2015.  
  2016.              Contents of MIX.LZH (Mix Power C Specific Files)
  2017.  
  2018.                LOADL.BAT         <- Sample link driver - large model
  2019.                LOADM.BAT         <- Sample link driver - medium model
  2020.                LOADS.BAT         <- Sample link driver - small model
  2021.                MAKELIB.BAT       <- Library driver (all models)
  2022.                PCCL.BAT          <- Large model compiler driver
  2023.                PCCM.BAT          <- Medium model compiler driver
  2024.                PCCS.BAT          <- Small model compiler driver
  2025.                SCOMPILE.BAT      <- Small model - compile *.c
  2026.                MCOMPILE.BAT      <- Medium model - compile *.c
  2027.                LCOMPILE.BAT      <- Large model - compile *.c
  2028.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2029.                WINBOSS.FNS       <- Type checking head
  2030.                ?PCVLIB.MIX       <- Memory model specific object file
  2031.                LWIN.MIX          <- Large model library
  2032.                MWIN.MIX          <- Medium model library
  2033.                SWIN.MIX          <- Small model library
  2034.                BOSSDEMO.PRJ      <- Project file for BOSSDEMO program
  2035.  
  2036.              Contents of LC6.LZH (Lattice C Specific Files)
  2037.  
  2038.                LCOMPILE.BAT      <- Large model - compile *.c
  2039.                SCOMPILE.BAT      <- Small model - compile *.c
  2040.                PCOMPILE.BAT      <- P model - compile *.c
  2041.                DCOMPILE.BAT      <- D model - compile *.c
  2042.                HCOMPILE.BAT      <- Huge model - compile.c
  2043.                LCS.BAT           <- Small model compiler driver
  2044.                LCL.BAT           <- Large model compiler driver
  2045.                LCP.BAT           <- P model compiler driver
  2046.                LCD.BAT           <- D model compiler driver
  2047.                LCH.BAT           <- H model compiler driver
  2048.                LOADLC.BAT        <- Link driver for BOSSDEMO
  2049.                LWIN.LIB          <- Large model library
  2050.                SWIN.LIB          <- Small model library
  2051.                MAKELIB.BAT       <- Build LIB file from OBJ(s)
  2052.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2053.                WINBOSS.FNS       <- Type checking header
  2054.                ?VLIB.OBJ         <- Memory model specific object file
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.                                                            Page: 33
  2069.                                                      The Window BOSS
  2070.  
  2071.  
  2072.  
  2073.         The SOURCE Distribution Diskette - continued.
  2074.  
  2075.  
  2076.  
  2077.              Contents of BCPP.LZH (Borland C++ Compiler)
  2078.  
  2079.                BOSSDEMO.PRJ      <- TC Project file for BOSSDEMO
  2080.                SAMPLE.PRJ        <- TC Project file for SAMPLE
  2081.                HELLO.PRJ         <- TC Project file for HELLO
  2082.                LCOMPILE.BAT      <- TCC - Large model - compile *.c 
  2083.                SCOMPILE.BAT      <- TCC - Small model - compile *.c
  2084.                CCOMPILE.BAT      <- TCC - Compact model - compile *.c
  2085.                MCOMPILE.BAT      <- TCC - Medium model - compile *.c
  2086.                HCOMPILE.BAT      <- TCC - Huge model - compile *.c
  2087.                LOADBC.BAT        <- Tlink driver for BOSSDEMO
  2088.                LWIN.LIB          <- Large model library
  2089.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2090.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2091.                SWIN.LIB          <- Small model library
  2092.                BCCL.BAT          <- Large model BCC compiler driver
  2093.                BCCS.BAT          <- Small model BCC compiler driver
  2094.                BCCM.BAT          <- Medium model BCC compiler driver
  2095.                BCCC.BAT          <- Compact model BCC compiler driver
  2096.                BCCH.BAT          <- Huge model BCC compiler driver
  2097.                WINBOSS.FNS       <- Type checking header
  2098.                ?TCVLIB.OBJ       <- Memory model specific object file
  2099.  
  2100.              Contents of TCPP.LZH (Borland TurboC++ Compiler)
  2101.  
  2102.                BOSSDEMO.PRJ      <- TC Project file for BOSSDEMO
  2103.                SAMPLE.PRJ        <- TC Project file for SAMPLE
  2104.                HELLO.PRJ         <- TC Project file for HELLO
  2105.                LCOMPILE.BAT      <- TCC - Large model - compile *.c 
  2106.                SCOMPILE.BAT      <- TCC - Small model - compile *.c
  2107.                CCOMPILE.BAT      <- TCC - Compact model - compile *.c
  2108.                MCOMPILE.BAT      <- TCC - Medium model - compile *.c
  2109.                HCOMPILE.BAT      <- TCC - Huge model - compile *.c
  2110.                LOADTC.BAT        <- Tlink driver for BOSSDEMO
  2111.                LWIN.LIB          <- Large model library
  2112.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2113.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2114.                SWIN.LIB          <- Small model library
  2115.                TCCL.BAT          <- Large model TCC compiler driver
  2116.                TCCS.BAT          <- Small model TCC compiler driver
  2117.                TCCM.BAT          <- Medium model TCC compiler driver
  2118.                TCCC.BAT          <- Compact model TCC compiler driver
  2119.                TCCH.BAT          <- Huge model TCC compiler driver
  2120.                WINBOSS.FNS       <- Type checking header
  2121.                ?TCVLIB.OBJ       <- Memory model specific object file 
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.                                                            Page: 34
  2130.                                                      The Window BOSS
  2131.  
  2132.  
  2133.  
  2134.         The SOURCE Distribution Diskette - continued.
  2135.              
  2136.  
  2137.  
  2138.              Contents of MS6.LZH (Microsoft C Specific Files)
  2139.  
  2140.                LCOMPILE.BAT      <- Large model - compile *.c
  2141.                SCOMPILE.BAT      <- Small model - compile *.c
  2142.                MCOMPILE.BAT      <- Medium model - compile *.c
  2143.                CCOMPILE.BAT      <- Compact model - compile *.c
  2144.                HCOMPILE.BAT      <- Huge model - compile *.c
  2145.                MCCL.BAT          <- Large model compiler driver
  2146.                MCCS.BAT          <- Small model compiler driver
  2147.                MCCM.BAT          <- Medium model compiler driver
  2148.                MCCC.BAT          <- Compact model compiler driver
  2149.                MCCH.BAT          <- Huge mode compiler driver
  2150.                LOADMS.BAT        <- Link driver for BOSSDEMO
  2151.                LWIN.LIB          <- Large model library
  2152.                SWIN.LIB          <- Small model library
  2153.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2154.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2155.                *.MAK             <- MAKE files - BOSSDEMO, HELLO, SAMPLE
  2156.                WINBOSS.FNS       <- Type checking header
  2157.                ?MSVLIB.OBJ       <- Memory model specific object file
  2158.  
  2159.              Contents of MSQC25.LZH (Microsoft Quick C Specific Files)
  2160.  
  2161.                SCOMPILE.BAT      <- Small model - compile *.c
  2162.                LCOMPILE.BAT      <- Large model - compile *.c
  2163.                MCOMPILE.BAT      <- Medium model - compile *.c
  2164.                CCOMPILE.BAT      <- Compact model - compile *.c
  2165.                HCOMPILE.BAT      <- Huge model - compile *.c
  2166.                MCCL.BAT          <- Large model compiler driver
  2167.                MCCS.BAT          <- Small model compiler driver
  2168.                MCCM.BAT          <- Medium model compiler driver
  2169.                MCCC.BAT          <- Compact model compiler driver
  2170.                MCCH.BAT          <- Huge model compiler driver
  2171.                LOADMS.BAT        <- Link driver for BOSSDEMO
  2172.                LWIN.LIB          <- Large model library
  2173.                SWIN.LIB          <- Small model library
  2174.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2175.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2176.                *.MAK             <- MAKE files - BOSSDEMO, HELLO, SAMPLE
  2177.                WINBOSS.FNS       <- Type checking header
  2178.                ?MSVLIB.OBJ       <- Memory model specific object file
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.                                                            Page: 35
  2191.                                                      The Window BOSS
  2192.  
  2193.  
  2194.  
  2195.         The SOURCE Distribution Diskette - continued.
  2196.              
  2197.  
  2198.  
  2199.  
  2200.              Contents of ZTC.LZH (Zortech C Specific Files)
  2201.  
  2202.                CCOMPILE.BAT      <- Compact model - compile *.c
  2203.                LCOMPILE.BAT      <- Large model   - compile *.c
  2204.                MCOMPILE.BAT      <- Medium model  - compile *.c
  2205.                SCOMPILE.BAT      <- Small model   - compile *.c
  2206.                LOADZTC.BAT       <- Link driver for BOSSDEMO
  2207.                LWIN.LIB          <- Larger model library
  2208.                MAKELIB.BAT       <- Build LIB file from OBJ(s)
  2209.                MAKELIB.CMD       <- Data file for makelib.bat
  2210.                SWIN.LIB          <- Small model library
  2211.                WINBOSS.FNS       <- Type checking header file
  2212.                ZTCC.BAT          <- Compact model compiler driver
  2213.                ZTCCB.BAT         <- Compact model big compiler driver
  2214.                ZTCL.BAT          <- Large model compiler driver
  2215.                ZTCLB.BAT         <- Large model big compiler driver
  2216.                ZTCM.BAT          <- Medium model compiler driver
  2217.                ZTCMB.BAT         <- Medium model big compiler driver
  2218.                ZTCS.BAT          <- Small model compiler driver
  2219.                ZTCSB.BAT         <- Small model big compiler driver
  2220.                ?MSVLIB.OBJ       <- Memory model specific object files
  2221.  
  2222.              Contents of WATCOM.LZH (Watcom Specific Files)
  2223.  
  2224.                WCCS.BAT          <- Small model compiler driver
  2225.                WCCL.BAT          <- Large model compiler driver
  2226.                WCCM.BAT          <- Medium model compiler driver
  2227.                WCCC.BAT          <- Compact model compiler driver
  2228.                WCCH.BAT          <- Huge model compiler driver
  2229.                CCOMPILE.BAT      <- Compact model - compile *.c
  2230.                LCOMPILE.BAT      <- Large model   - compile *.c
  2231.                MCOMPILE.BAT      <- Medium model  - compile *.c
  2232.                SCOMPILE.BAT      <- Small model   - compile *.c
  2233.                HCOMPILE.BAT      <- Huge model    - compile *.c
  2234.                LOADWAT.BAT       <- Link driver for BOSSDEMO
  2235.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2236.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2237.                SWIN.LIB          <- Small model library
  2238.                LWIN.LIB          <- Large model library
  2239.                WINBOSS.FNS       <- Type checking header
  2240.                ?WCVLIB.OBJ       <- Memory model specific object files
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.                                                            Page: 36
  2252.                                                      The Window BOSS
  2253.  
  2254.  
  2255.  
  2256.         The SOURCE Distribution Diskette - continued.
  2257.              
  2258.  
  2259.  
  2260.  
  2261.              Contents of TSC.LZH (TopSpeed C Specific Files)
  2262.  
  2263.                BOSSDEMO.PR       <- MAKE file for BOSSDEMO
  2264.                TSAPP.PR          <- Generic Make file
  2265.                HELLO.PR          <- MAKE file for HELLO
  2266.                SAMPLE.PR         <- MAKE file for SAMPLE
  2267.                MAKECWIN.PR       <- MAKE file for Compact model library
  2268.                MAKELWIN.PR       <- MAKE file for Large model library
  2269.                MAKEMTWI.PR       <- MAKE file for Mthread model library
  2270.                MAKEMWIN.PR       <- MAKE file for Medium model library
  2271.                MAKESWIN.PR       <- MAKE file for Small model library
  2272.                MAKEXWIN.PR       <- MAKE file for Xlarge model library
  2273.                SWIN.LIB          <- Small model library
  2274.                LWIN.LIB          <- Large model library 
  2275.                WINBOSS.FNS       <- Type checking header
  2276.                TSS.BAT           <- Compiler driver batch file
  2277.                SMSVLIB.OBJ       <- Small model specific object file
  2278.                CMSVLIB.OBJ       <- Compact model specific object file
  2279.                MMSVLIB.OBJ       <- Medium model specific object file
  2280.                MTMSVLIB.OBJ      <- Mthread model specific object file
  2281.                LMSVLIB.OBJ       <- Large model specific object file
  2282.                XMSVLIB.OBJ       <- Xlarge model specific object file
  2283.                GENFNS.BAT        <- Instructions for creating "winboss.fns"
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.                                                            Page: 37
  2313.                                                      The Window BOSS
  2314.  
  2315.  
  2316.  
  2317.         6. Installation, Compiling, Linking 
  2318.  
  2319.         6.1. Installation
  2320.  
  2321.              By the numbers:
  2322.  
  2323.                 1) MAKE A BACKUP OF ALL DISKS !!!
  2324.  
  2325.                 2) Shareware diskettes - Use LHARC to unarchive 
  2326.                    BOSS_SUP.LZH and the BOSS_LB?.LZH file that 
  2327.                    corresponds to the compiler you normally use. If you 
  2328.                    use more than one compiler then perform the 
  2329.                    installation procedure from start to finish for each 
  2330.                    compiler. For example (Microsoft):
  2331.  
  2332.                           B>A:LHARC E A:BOSS_SUP
  2333.                           B>A:LHARC E A:BOSS_LB1 
  2334.  
  2335.                 2) Source Code diskettes - Use LHARC to unarchive 
  2336.                    CFILES.LZH and ASMFILES.LZH. Then, depending upon the 
  2337.                    compiler you intend to use, unarchive one of the 
  2338.                    following: MS6.LZH, MSQC25.LZH, BCPP.LZH, TCPP.LZH, 
  2339.                    LC6.LZH, MIX.LZH, WATCOM.LZH, ZTC.LZH, or TSC.LZH. 
  2340.                    If you use more than one compiler then perform the 
  2341.                    installation procedure from start to finish for each 
  2342.                    compiler.
  2343.  
  2344.                 3) Copy the LIBrary that corresponds to the compiler you 
  2345.                    are using onto the disk(s) and/or sub-directories that 
  2346.                    contain your "C" compiler's run time libraries . Be 
  2347.                    sure that the small model library is named "SWIN.LIB" 
  2348.                    (see notes below). The large model library should be 
  2349.                    named "LWIN.LIB". MIX Power C libraries are named 
  2350.                    SWIN.MIX, MWIN.MIX and LWIN.MIX.
  2351.  
  2352.  
  2353.                    ** Shareware Users Note ** - The examples used in the 
  2354.                    documentation assume the library's name to be SWIN.LIB 
  2355.                    for the small memory model (SWIN.MIX for MIX Power C). 
  2356.                    You should rename the library you extracted to conform 
  2357.                    to this naming convention to eliminate any possible 
  2358.                    confusion.  For example:
  2359.  
  2360.                             B:>RENAME SMSC6.LIB SWIN.LIB
  2361.  
  2362.                 4) Copy "WINBOSS.H", "WINBOSS.FNS", and "WINBOSS.EXT" to 
  2363.                    the disk(s) and/or sub-directories that contain your 
  2364.                    "C" compiler's include files. 
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.                                                            Page: 38
  2374.                                                      The Window BOSS
  2375.  
  2376.  
  2377.  
  2378.         Installation - continued.
  2379.  
  2380.  
  2381.  
  2382.                 5) Copy (or rename) the small memory model compiler 
  2383.                    driver batch file that corresponds to the compiler you 
  2384.                    are using to:
  2385.  
  2386.                                      CSM.BAT
  2387.  
  2388.                 5) Read the "Compiling", "Linking", and "General Notes" 
  2389.                    sections of this manual.  The "General Notes" section 
  2390.                    has across the board information that everyone should 
  2391.                    review and compiler specific tips that are very 
  2392.                    important.
  2393.  
  2394.                 6) Suggestion - After installing The Window BOSS, build 
  2395.                    the HELLO program using either the command line 
  2396.                    compiler or your integrated environment.  If you have 
  2397.                    any difficulty, review both the "Hints on Resolving 
  2398.                    Common Problems" and "General Notes" section of this 
  2399.                    manual.  Pay special attention to the notes on your 
  2400.                    specific compiler.
  2401.  
  2402.                 7) Remember there is no magic to using The Window BOSS. 
  2403.                    It's simple!!
  2404.  
  2405.         6.1.1. Installation Notes and Cautions
  2406.  
  2407.           1) If WINBOSS.FNS is not contained in the archive for your 
  2408.              compiler, or is not present after you unarchive the required 
  2409.              files, copy (or rename) WINDOWS.FN6, WINDOWS.FNB, 
  2410.              WINDOWS.FNZ, WINDOWS.FNT to WINBOSS.FNS according to the 
  2411.              following table:
  2412.  
  2413.                        Compiler                 File
  2414.                        ---------                -----
  2415.                        Microsoft C & Quick C    WINDOWS.FN6
  2416.                        Borland C++              WINDOWS.FNB
  2417.                        Borland Turbo C          WINDOWS.FNB
  2418.                        Lattice                  WINDOWS.FNB
  2419.                        Mix Power C              WINDOWS.FN6
  2420.                        WATCOM                   WINDOWS.FNB
  2421.                        TopSpeed C               WINDOWS.FNT
  2422.                        Zortech                  WINDOWS.FNZ
  2423.  
  2424.           2) If you are installing The Window Boss for multiple compilers 
  2425.              it is imperative that you complete the installation 
  2426.              procedure from start to finish for each compiler.  This will 
  2427.              eliminate any potential problems due to common names across 
  2428.              compilers (WINBOSS.FNS, SWIN.LIB...).
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.                                                            Page: 39
  2435.                                                      The Window BOSS
  2436.  
  2437.  
  2438.  
  2439.         Installation/Compiling/Linking - continued.
  2440.  
  2441.  
  2442.  
  2443.         6.2. Compiling (Command line)
  2444.  
  2445.              Compile your application source code in the following 
  2446.              manner:
  2447.  
  2448.                                   C>csm hello
  2449.  
  2450.              Notes:
  2451.  
  2452.                ** ALL compilers should be invoked with the compiler 
  2453.                driver batch files supplied with The Window BOSS.  Some 
  2454.                compilers require ".c" to be added to the name of the 
  2455.                source file e.g. "csm hello.c".  The examples in this 
  2456.                manual assume you are creating small memory model 
  2457.                programs.
  2458.  
  2459.                The Window BOSS includes "winboss.h", "winboss.fns", and 
  2460.                "winboss.ext".  These files can be placed with your 
  2461.                compiler's other INCLUDE files or they can remain in the 
  2462.                same directory as your "C" programs.  Depending upon your 
  2463.                installation, you may have to edit HELLO.C and/or 
  2464.                WINBOSS.H to follow the "" .vs. <> include file 
  2465.                convention.  All of BOSS's includes are of the form:
  2466.  
  2467.                              #include "include_file_name"
  2468.  
  2469.                If you examine CSM.BAT you will notice some command line 
  2470.                parameters that are passed to your compiler.  These 
  2471.                command line parameters are an absolute requirement and 
  2472.                must always be present.  They are used by "winboss.h" to 
  2473.                set various conditions required by your specific compiler.
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.                                                            Page: 40
  2496.                                                      The Window BOSS
  2497.  
  2498.  
  2499.  
  2500.         Installation/Compiling/Linking - continued.
  2501.  
  2502.  
  2503.  
  2504.         6.3. Linking (Command line)
  2505.  
  2506.              Simply specify the ?WIN.LIB file that corresponds to the 
  2507.              compiler/memory model you are using.  Don't forget to 
  2508.              include your compiler's runtime library as well. The 
  2509.              following examples demonstrate basic linking using the small 
  2510.              model library (medium for MIX Power C):
  2511.  
  2512.                 Lattice 
  2513.                   lmb hello,hello,,swin+lcr;                       
  2514.  
  2515.                 Microsoft C
  2516.                   link hello,hello,,swin;                         
  2517.  
  2518.                 Microsoft QuickC
  2519.                   qlink hello,hello,,swin                         
  2520.                 
  2521.                 Borland
  2522.                   tlink /c c0s hello,hello,hello,swin emu maths cs
  2523.  
  2524.                 Mix Power C                          
  2525.                   pcl hello;swin [5k,40k,0]
  2526.  
  2527.                 Watcom
  2528.                   wlink file hello library swin,maths,clibs
  2529.  
  2530.                 ZORTECH
  2531.                   blink hello,hello,,swin
  2532.  
  2533.                 TOPSPEED
  2534.                       
  2535.                   ts hello /m
  2536.  
  2537.                      ** Read the "TopSpeed" section of "General Notes"
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.                                                            Page: 41
  2557.                                                      The Window BOSS
  2558.  
  2559.  
  2560.  
  2561.         Installation/Compiling/Linking - continued.
  2562.  
  2563.  
  2564.  
  2565.         Linking Notes:
  2566.  
  2567.         The linking examples may have to be modified to include the 
  2568.         complete path specifiers for each library.  For example:
  2569.  
  2570.                        link hello,hello,,c:\msc6\lib\swin
  2571.  
  2572.         Fixup offset errors are always the result attempting of to link 
  2573.         code compiled under one memory model with libraries created for 
  2574.         use with another memory model.
  2575.  
  2576.         Unresolved externals can be caused by missing user functions, 
  2577.         missing library functions, linking command errors, missing 
  2578.         project files, missing MAKE files, or attempting to link a non 
  2579.         conforming library. Misplaced commas on the command line and C 
  2580.         code typing errors are the most common problems.  In the case of 
  2581.         integrated environment fans (Quick C, MSC PWB, Turbo C) it is 
  2582.         almost always due to forgetting to SET THE PROGRAM LIST to 
  2583.         include The Window BOSS library or, in the case of Turbo C, 
  2584.         forgetting to create a project file that includes an entry for 
  2585.         The Window BOSS library.
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.                                                            Page: 42
  2618.                                                      The Window BOSS
  2619.  
  2620.  
  2621.  
  2622.         7. General and Compiler Specific Notes
  2623.  
  2624.         Source code is provided for all of the high level data entry 
  2625.         functions, the help system, and the popup menu functions.  This 
  2626.         is done so that you (1) have a wide variety of templates to base 
  2627.         any local data entry functions on and (2) have the source to the 
  2628.         code to those functions (help & popup) which are commonly changed 
  2629.         to suit individual taste.
  2630.  
  2631.         WN_BIOS.C and the various assembler files (*.ASM) contain all of 
  2632.         the BIOS interface functions.  Only v_kstat(), v_border(), 
  2633.         _vidblt(), and xferdata() are written in assembly language!!  
  2634.  
  2635.         This one is REAL important - Both the C and assembly functions 
  2636.         make very heavy use of pointers.  The code contains numerous 
  2637.         checks to ensure that memory, outside of that in use by the 
  2638.         program, is not corrupted.  If you attempt to do something that 
  2639.         would cause memory to be corrupted an error message will appear 
  2640.         and your program will exit.  This message will usually say that a 
  2641.         bad handle was passed to some function.  This error is normally 
  2642.         caused by a stray pointer in the application code!  Check all 
  2643.         your pointer operations.  Doing strcpy's to arrays with 
  2644.         insufficient space will always cause this type of problem.
  2645.  
  2646.         Generally speaking, the members of the window control block 
  2647.         (refer to winboss.h) should not be modified unless you are 
  2648.         familiar with how they are used by the various functions.  We 
  2649.         suggest you obtain a hard copy of "winboss.h" and review it even 
  2650.         if you don't have any intentions of modifying the code.  There is 
  2651.         a great deal of information contained in "winboss.h" that you may 
  2652.         find helpful when writing your application.
  2653.  
  2654.         Although the routines appear to support the multi page 
  2655.         capabilities of the IBM Color Card, actual support of this 
  2656.         feature has not been implemented.  Invoking the functions with 
  2657.         references to video pages other than than those documented might 
  2658.         produce interesting, but undesired results.  
  2659.  
  2660.         Programs such as Wordstar and Lotus change the video mode when 
  2661.         they run.  If your system is equipped with a color monitor and 
  2662.         your windows are appearing in black and white, issue a call to 
  2663.         v_smode to set the video mode to 3.  Alternatively, you can use 
  2664.         the "MODE CO80" command at DOS level before you run your 
  2665.         application.  
  2666.  
  2667.         The best way to manipulate the method by which windows are 
  2668.         updated is via the wn_dmode() function.  Calling wn_dmode(PAINT) 
  2669.         causes the image to be painted while wn_dmode(FLASH) causes the 
  2670.         image to be flash updated.  Flash updating is the preferred 
  2671.         (default) method.  Please keep in mind that windows are always 
  2672.         flash updated on monochrome systems. 
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.                                                            Page: 43
  2679.                                                      The Window BOSS
  2680.  
  2681.  
  2682.  
  2683.         7.1. Upgrading - Existing Applications Impact
  2684.  
  2685.         If you are upgrading from a previous version of The Window BOSS 
  2686.         be sure to re-compile and re-link your application.  This will 
  2687.         eliminate the possibility of any "unusual" problems.
  2688.  
  2689.         7.2. Current Compilers & Libraries
  2690.  
  2691.         The distribution libraries were created on an IBMPC/AT under DOS 
  2692.         5.0 using, Lattice 6.05, Microsoft 6.0a, Microsoft QuickC 2.51, 
  2693.         Borland C++ 2.0, Watcom C 8.5, Mix Power C 2.1.0, Zortech 2.10, 
  2694.         and TopSpeed 3.02.  Test hardware: IBMPC/XT/AT, PS/2, with IBM 
  2695.         Monochrome, CGA, EGA, and VGA video adapters.  Additionally, a 
  2696.         wide variety of clones (8088, 8086, 80186, 80286, 80386) with 
  2697.         brand name and noname components were also tested.
  2698.  
  2699.         Several of the compilers support a compile time command line 
  2700.         parameter that results in structures being byte aligned instead 
  2701.         of word aligned.  In all cases, the compiler default option was 
  2702.         used to compile the modules in the various libraries.
  2703.  
  2704.         7.3. EGA & VGA Expanded Line & Column Modes
  2705.  
  2706.         The Window BOSS supports the Expanded Line and Column modes of 
  2707.         both the EGA and VGA video adapters.  However, in order to 
  2708.         preserve The Window BOSS's device independence you will have to 
  2709.         do a little extra work if you intend to write an application that 
  2710.         is going to take advantage of one of these expanded modes.  The 
  2711.         rules are quite simple.  Your application must remain in one 
  2712.         mode.  It can be (25 x 80), (80 x 132), (80 x 43), (80 x 50), or 
  2713.         whatever size your adapter supports.  The adapter must be in the 
  2714.         mode you chose prior to calling ANY of The Window BOSS functions.  
  2715.         WN_PSINIT() must be called first, called only once, and be called 
  2716.         with parameters that reflect the physical screen size that your 
  2717.         application is going to use.  That's all there is to it!  
  2718.  
  2719.         7.4. Terminate and Stay Resident (TSR) Programming
  2720.  
  2721.         The Window BOSS has been successfully incorporated in TSR 
  2722.         programs. Due to the complexities involved in writing and 
  2723.         resolving conflicts associated with TSR(s) and the lack of any 
  2724.         real standards for TSR(s) Star Guidance Consulting, Inc. can not 
  2725.         provide any form of support or assistance for TSR related 
  2726.         problems.  We will, however, work with you in resolving any 
  2727.         problem you can replicate when the program is not resident.
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.                                                            Page: 44
  2740.                                                      The Window BOSS
  2741.  
  2742.  
  2743.  
  2744.         General Notes - continued.
  2745.  
  2746.  
  2747.         7.5. Important Globals
  2748.  
  2749.         Several global symbols are used by the various functions. All are 
  2750.         defined in "windows.c" and referenced in "winboss.ext".  A few 
  2751.         are worthy of special mention:
  2752.  
  2753.                                  int wn_dmaflg;
  2754.                                  int wn_sbit;
  2755.                                  int wns_escape;
  2756.  
  2757.         7.5.1. wns_dmaflg
  2758.  
  2759.              wn_dmaflg when TRUE enables direct writes into video ram. 
  2760.              This is the default setting and should work in all cases.  
  2761.              Setting wn_dmaflg to FALSE will disable these direct writes. 
  2762.              When wn_dmaflg is FALSE the BIOS video routines are used. 
  2763.              This results in slower screen updates.  However, this method 
  2764.              does have the advantage of being considered "well behaved" 
  2765.              by IBM's Topview, Microsoft's Windows, and DESQ.  
  2766.              
  2767.         7.5.2. wn_sbit
  2768.  
  2769.              wn_sbit controls the window refresh rate on systems with  
  2770.              color cards.  When set to SLOW (defined in winboss.h), 
  2771.              window displays will appear to be painted on the screen 
  2772.              rather than flash displayed. This is the default value.  
  2773.              Setting wn_sbit to FAST enables flash displays. Artistic use 
  2774.              of wn_sbit can give your application that extra visual 
  2775.              touch. Experiment!
  2776.  
  2777.              From a performance standpoint, the fastest (flicker & snow 
  2778.              free) screen updates will occur with wn_dmaflg=TRUE 
  2779.              (default) and wn_sbit=FAST (default).  The key words here 
  2780.              are flicker and snow free.  Scrolling speed can be 
  2781.              increased, with a proportional increase in flicker 
  2782.              (perhaps), by using wn_scroll() function to set the 
  2783.              scrolling method for the window to BIOS.  This technique 
  2784.              will provide the fastest screen updates and scrolling on 
  2785.              color systems.
  2786.  
  2787.          7.5.3. wns_escape
  2788.  
  2789.              wns_escape is set to TRUE whenever wn_input detects that the 
  2790.              escape key has been pressed.  Since wn_input is the 
  2791.              underlying logic for the entire data entry package, 
  2792.              knowledge of this global may help you manage your data entry 
  2793.              activities better.  For example, you may want to follow one 
  2794.              logic path if data entry completed normally and another if 
  2795.              data entry was terminated because the escape key was 
  2796.              pressed.
  2797.  
  2798.  
  2799.  
  2800.                                                            Page: 45
  2801.                                                      The Window BOSS
  2802.  
  2803.  
  2804.  
  2805.         General Notes - continued.
  2806.  
  2807.  
  2808.  
  2809.         7.6. Microsoft C
  2810.  
  2811.         Some large model programs may require a stack greater than 4096 
  2812.         bytes.
  2813.  
  2814.         PWB and Integrated Development Environment fans take note - If 
  2815.         program and/or data space is at a premium - disabling debugging 
  2816.         can sometimes restore significant program and/or data space.  
  2817.  
  2818.         Microsoft Version 6.XX Programmer Workbench 
  2819.  
  2820.         PWB fans must define "MSCV6=1" in the defines dialogue box.  Do 
  2821.         this by selecting "OPTIONS" then "C COMPILER OPTIONS".  
  2822.  
  2823.         The same rules that apply to the creation of MAKE files for Quick 
  2824.         C (SETTING THE PROGRAM LIST) also apply.  The program list can be 
  2825.         set by selecting the MAKE dialog box, then SET PROGRAM LIST.  Be 
  2826.         sure to include an explicit entry for The Window BOSS library.
  2827.  
  2828.         7.7. Microsoft QuickC
  2829.  
  2830.         Microsoft QuickC - All Integrated Development Environment users 
  2831.         MUST create MAKe files in order to be able to create EXEcutable 
  2832.         programs from within the Developmental Environment.  The MAKe
  2833.         file must contain the names of all of the programs that comprise 
  2834.         the application along with specific entries for all 3rd party 
  2835.         libraries being used.  In the case of 3rd party libraries, the 
  2836.         complete path specification for the library must be provided 
  2837.         (e.g. c:\msc\lib\swin.lib).  The MAKe file is created when you set 
  2838.         the program list.  Select the MAKE dialog BOX, then SET PROGRAM 
  2839.         LIST. Follow the standard rules for the creation of "MAK" files.
  2840.  
  2841.         QuickC 2.5 Integrated Development Environment
  2842.  
  2843.         MSCV6=1 must be defined in "COMPILER FLAGS" "DEFINES" dialog box 
  2844.         (select OPTIONS, MAKE, COMPILER FLAGS, then fill in DEFINES with 
  2845.         MSCV6=1).
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.                                                            Page: 46
  2862.                                                      The Window BOSS
  2863.  
  2864.  
  2865.  
  2866.         General Notes - continued.
  2867.  
  2868.  
  2869.  
  2870.         7.8. Borland C++ and Borland Turbo C++
  2871.  
  2872.         IDE (Integrated Development Environment) - Window BOSS users who 
  2873.         prefer the IDE over the command line compiler *MAY* have to 
  2874.         disable source level debugging when attempting to run their 
  2875.         applications from within the IDE via ^F9.  There are also 
  2876.         problems with running Window BOSS applications from within the 
  2877.         IDE when Sidekick (1.56A) is loaded.  Borland has been notified 
  2878.         of these problems (7/19/90).  PLEASE KEEP IN MIND THAT THESE 
  2879.         PROBLEMS ONLY APPLY WHEN USING THE IDE - THEY DO NOT IMPACT THE 
  2880.         FINAL APPLICATION.
  2881.  
  2882.           To disable source level debugging from within the IDE, select 
  2883.           Options, then Debugger, then set "Source Debugging" to NONE.  
  2884.           It may also help to disable debugging information from being 
  2885.           placed in the OBJ files.  This is done by selecting Options, 
  2886.           then Compiler, then Code Generation, then More - then disable 
  2887.           "Debug info in OBJs".
  2888.  
  2889.         IDE users MUST create PROJECT files in order to be able to create 
  2890.         EXEcutable programs from within the Integrated Environment.  The 
  2891.         PROJECT file must contain the names of all of the programs that 
  2892.         comprise the application along with specific entries for all 3rd 
  2893.         party libraries being used.  In the case of 3rd party libraries, 
  2894.         the complete path specification for the library must be provided 
  2895.         (e.g. c:\turboc\lib\swin.lib).
  2896.  
  2897.         7.9. MIX Power C
  2898.  
  2899.         Mix Power C - The linker should always be told the amount of 
  2900.         memory to be assigned to the stack, heap, and far heap.  Since 
  2901.         The Window BOSS uses both heap and far memory outside of your 
  2902.         program, it is imperative that PCL be invoked with reasonable 
  2903.         parameters. Typical values are [5k,40k,0] or [5k,40k,100k]. Refer 
  2904.         to the chapter on the Mix Linker in the Power C manual.
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.                                                            Page: 47
  2923.                                                      The Window BOSS
  2924.  
  2925.  
  2926.  
  2927.         General Notes - continued.
  2928.  
  2929.  
  2930.  
  2931.         7.10. TopSpeed C
  2932.  
  2933.         TopSpeed C - The TopSpeed compiler requires all applications to 
  2934.         be compiled and linked via PROJECT (MAKE) files.  The Window BOSS 
  2935.         library must be included in all project files that reference 
  2936.         applications that use The Window BOSS.  The Window BOSS libraries 
  2937.         themselves should be placed in the directory that TopSpeed C uses 
  2938.         for its run time libraries. The following example (small memory 
  2939.         model) should help clarify this. 
  2940.  
  2941.           Application Directory                TopSpeed C LIB Directory
  2942.           ---------------------             |  ------------------------ 
  2943.           (C:\SOURCE)                       |  (C:\TS\LIB)
  2944.                                             |
  2945.            HELLO.C   <-Application Code     |  SWIN.LIB  <- Library 
  2946.            HELLO.PR  <-Application PRJ File |
  2947.                                             |
  2948.            WINBOSS.H   \  Standard Window   |
  2949.            WINBOSS.FNS  > BOSS #include     |
  2950.            WINBOSS.EXT /  files.            |
  2951.  
  2952.         Application project files must include a memory model specific 
  2953.         "model" directive and a link pragma for The Window BOSS library.  
  2954.         For example, the HELLO.PRJ file for the small memory model is as 
  2955.         follows:
  2956.  
  2957.                              #system auto exe
  2958.                              #model  small
  2959.                              #pragma link (swin.lib)
  2960.                              #compile %main
  2961.                              #link %prjname
  2962.  
  2963.         The Shareware and Source media kit contain a generic application 
  2964.         project file named "TSAPP.PRJ".  "TSAPP.PRJ" can be copied to 
  2965.         "HELLO.PRJ", "BOSSDEMO.PRJ", and "SAMPLE.PRJ".  This will allow 
  2966.         you to test and experiment with these programs using either the 
  2967.         command line compiler or the integrated environment.  Application 
  2968.         project files can also be created and/or edited under TopSpeed's 
  2969.         integrated environment by using the "Project" pulldown menu.
  2970.  
  2971.         Project files for the various Window BOSS libraries 
  2972.         (MAKESWIN.PR,...MAKELWIN.PR) are provided as part of the Window 
  2973.         BOSS Source media kit. Depending on the memory model(s) you use, 
  2974.         one, or more, of these files must be present in the same 
  2975.         directory as your application code and application project file.
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.                                                            Page: 48
  2984.                                                      The Window BOSS
  2985.  
  2986.  
  2987.  
  2988.         General Notes - continued.
  2989.  
  2990.  
  2991.  
  2992.         7.11. Zortech C
  2993.  
  2994.         Zortech C - ZORLIB (as distributed with version 2.0 of Zortech C) 
  2995.         can not produce a correctly formatted library of The Window BOSS 
  2996.         functions.  Microsoft's library manager LIB was used to create 
  2997.         the libraries distributed with The Window BOSS.  Please do not 
  2998.         attempt to recreate or update any of The Window BOSS libraries 
  2999.         with ZORLIB.  Zortech has been notified of the problem.
  3000.  
  3001.         BOSSDEMO.C must be compiled with the BIG compiler.
  3002.  
  3003.         7.12. Lattice C
  3004.  
  3005.         Lattice C - Lattice large model programs sometimes require the 
  3006.         heap to be set to a minimum value.  This can be accomplished by 
  3007.         setting _MNEED or specifying the stack and heap size at run time. 
  3008.         A minimum heap size of 32k will usually satisfy most 
  3009.         applications. REMEMBER: This is for the LARGE model only.  Refer 
  3010.         to the Lattice reference manuals for further information on 
  3011.         setting the stack and heap size.
  3012.  
  3013.         Fixup offset errors for the text segment of vlib.asm are normal 
  3014.         when linking HUGE memory model programs under version 6.05.
  3015.  
  3016.         7.13. Feedback
  3017.  
  3018.         PLEASE - Pass along your comments.  The Window BOSS is your tool.  
  3019.         If you find any logic errors let us know.  We are committed to 
  3020.         making The Window BOSS the best price performer available.  Call, 
  3021.         write, or if you prefer, you can reach us via CompuServe, GENIE, 
  3022.         or BIX.  Our CompuServe electronic mail ID is [71565,1001], our 
  3023.         GENIE mail address is "MONGELLUZZO", our BIX NAME is 
  3024.         "pmongelluzzo". Remember, there is no reason to sit, steam, or 
  3025.         complain to those who can not provide any real form of support.  
  3026.         Lastly, if you use The Window BOSS, register your copy.  The 
  3027.         Shareware System will only work if you support it!
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.                                                            Page: 49
  3045.                                                      The Window BOSS
  3046.  
  3047.  
  3048.  
  3049.         8. Hints on Resolving Common Problems
  3050.  
  3051.         8.1. Unresolved Externals
  3052.  
  3053.         Unresolved externals are most common with the programming 
  3054.         environments of Borland C++, Borland Turbo C++, Microsoft PWB, 
  3055.         and Microsoft Quick C.  All of these programming environments 
  3056.         require "program lists" or "make files".  This type of error can 
  3057.         also be caused by not explicitly specifying a Window BOSS library 
  3058.         on the link command line.  All linkers must have explicit 
  3059.         knowledge of what 3rd party libraries are to be linked with the 
  3060.         compiler libraries and your applications object files. This 
  3061.         problem is usually resolved by creating a program list or make 
  3062.         file that includes a explicit reference to one of The Window BOSS 
  3063.         libraries, or explicitly specifying the correct Window BOSS 
  3064.         library as part of the link command line.  Refer to your compiler 
  3065.         documentation for further information.
  3066.  
  3067.         8.2. Fixup Offset Errors
  3068.  
  3069.         These are always the result of attempting to link code compiled 
  3070.         under one memory model with libraries created for use with 
  3071.         another memory model.
  3072.  
  3073.         8.3. Bad Handle Exits
  3074.  
  3075.         Both the C and assembly functions make very heavy use of 
  3076.         pointers.  The code contains numerous checks to ensure that 
  3077.         memory does not get corrupted or randomly written over.  This 
  3078.         error is normally caused by a stray pointer in the application 
  3079.         code!  Check and recheck all of your pointer operations.  Doing 
  3080.         strcpy's to arrays with insufficient space will always cause this 
  3081.         type of problem.
  3082.  
  3083.         Oftentimes switching from the small memory model to large memory 
  3084.         model will initially produce these errors in programs that were 
  3085.         working fine in the small model.  In nearly every case the 
  3086.         problem was traced to a stray pointer or improper pointer usage.
  3087.  
  3088.         8.4. Fatal Compilation Errors
  3089.  
  3090.         All command line compilers should be invoked with the compiler 
  3091.         driver batch files provided as part of The Window BOSS.  This 
  3092.         insures the compiler specific compile time parameters are 
  3093.         specified correctly.  If you elect to use you own method, be sure 
  3094.         to include ALL of the command line parameters that are specified 
  3095.         in the provided batch files.  
  3096.  
  3097.         8.5. Missing Files
  3098.  
  3099.         Remember, the documentation covers two media kits (Shareware and 
  3100.         Source) and neither kit contains ALL files.  If you are missing 
  3101.         files that are listed for your media kit, please contact us.
  3102.  
  3103.  
  3104.  
  3105.                                                            Page: 50
  3106.                                                      The Window BOSS
  3107.  
  3108.  
  3109.  
  3110.         Hints on Resolving Common Problems - continued.
  3111.  
  3112.  
  3113.  
  3114.         8.6. Linking Errors
  3115.  
  3116.         (A) See "Unresolved Externals" above. (B) Most linking errors are 
  3117.         the result of; (1) forgetting to specify the library to link, (2) 
  3118.         specifying the wrong library, or (3) command line syntax errors.  
  3119.         Double check your compiler documentation for the proper way to 
  3120.         link "other libraries" or "3rd party libraries".
  3121.  
  3122.         8.7. Other Problems
  3123.  
  3124.         Double check this manual for proper usage, review your compiler 
  3125.         documentation, then contact us.
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.                                                            Page: 51
  3167.                                                      The Window BOSS
  3168.  
  3169.  
  3170.  
  3171.         9. Making Changes
  3172.  
  3173.         Incorporating local modifications or enhancements is, in part, 
  3174.         why you acquired the source code to begin with.  Incorporating 
  3175.         your modifications or enhancements should be be a relatively 
  3176.         straight forward task provided you follow the basic guidelines 
  3177.         outlined in the subsequent sections of this manual.  
  3178.  
  3179.         If you feel you have developed a significant enhancement that is 
  3180.         both well documented and written please let us know.  We have, 
  3181.         from time to time, incorporated customer supplied enhancements to 
  3182.         our products.  Contact us for further details.
  3183.  
  3184.         9.1. General Considerations
  3185.  
  3186.         First, be sure that you are familiar with the existing 
  3187.         conventions and compiler specific feature test switches. Refer to 
  3188.         the various BATch files for specific examples of compiler 
  3189.         specific defines (etc.).  
  3190.  
  3191.         Please note that we assume that you have installed your compiler 
  3192.         exactly as suggested in the compiler's manual.  This includes 
  3193.         suggested sub-directories, PATH specifiers, and environment 
  3194.         setup.  Check and double check the "include" file requirements - 
  3195.         make sure you have the required files and that they have been 
  3196.         edited to correspond to the memory model you are writing code 
  3197.         for. Creating code that compiles under numerous compilers is not 
  3198.         an easy task.  If you run into problems review your compilers 
  3199.         documentation and browse through the batch files provided.  If 
  3200.         you still have problems - call!  
  3201.  
  3202.         Carefully review the area of code you wish to modify or enhance - 
  3203.         be sure to get a complete understanding of what's currently going 
  3204.         on before you add your own code.  With the exception of the ASM 
  3205.         files, compiler and memory model specific feature test switches 
  3206.         are specified on the command line. 
  3207.  
  3208.         Depending upon the compiler being used, several warning errors 
  3209.         will be generated.  Warnings created by the unmodified 
  3210.         distribution code can be safely ignored - all others should be 
  3211.         investigated.
  3212.  
  3213.         A note of caution... PC/MS-DOS Version 2.XX's LINK can complain 
  3214.         if you build a new library that takes advantage of later LINK 
  3215.         enhancements.  If this occurs, you can (1) upgrade to DOS 3.1++ 
  3216.         or, (2) get a librarian that isn't so smart!!  We suggest going 
  3217.         to the later revision of DOS.
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.                                                            Page: 52
  3228.                                                      The Window BOSS
  3229.  
  3230.  
  3231.  
  3232.         Making Changes - continued.
  3233.  
  3234.  
  3235.         9.2. Specific Changes to Consider
  3236.  
  3237.         Both the Shareware and Source versions of The Window BOSS and 
  3238.         Data Clerk are supplied with the numerous common source code 
  3239.         files.
  3240.  
  3241.         The source code was provided to serve as the basis upon which you 
  3242.         could develop your own enhancements to the product and to provide 
  3243.         you with those modules which may need to be modified for your 
  3244.         particular application.  The latter is true of wn_frmget, 
  3245.         wn_iemsg, and wn_ihmsg.  You should consider modifying these 
  3246.         routines if you want to change the way in which data entry forms 
  3247.         are handled when completed (wn_frmget), the way in which data 
  3248.         entry field help messages are displayed  (wn_ihmsg), or the way 
  3249.         in which data entry field error messages are displayed 
  3250.         (wn_iemsg).
  3251.  
  3252.         In the case of wn_frmget, the code to modify is at the tail end 
  3253.         of the file and is clearly labeled.  Data entry Help messages are 
  3254.         displayed by wn_ihmsg whenever the HELP key is depressed.  Data 
  3255.         entry error messages are displayed by wn_iemsg whenever 
  3256.         validation for a particular field fails.  Refer to the source 
  3257.         code files and the descriptions of these functions in the 
  3258.         function synopsis section of this document.
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.                                                            Page: 53
  3289.                                                      The Window BOSS
  3290.  
  3291.  
  3292.  
  3293.         Making Changes - continued.
  3294.  
  3295.  
  3296.         9.3. TopSpeed C 
  3297.  
  3298.         If you do not have the Source media kit or are making a limited 
  3299.         number of changes or are testing a small number of changes, the 
  3300.         best approach to take is to modify your application's project 
  3301.         file to include an entry for the modified source code.  The 
  3302.         example below contains an entry for a locally modified version of 
  3303.         wn_frmget.  It is important to note that this project file will 
  3304.         cause the compiler to generate a warning message stating that 
  3305.         wn_frmget is duplicated.  This is a case in which the error 
  3306.         message can be safely ignored.
  3307.  
  3308.                        #system auto exe
  3309.                        #model  small
  3310.                        #compile wn_frmget
  3311.                        #pragma link (swin.lib)
  3312.                        #compile %main
  3313.                        #link %prjname
  3314.  
  3315.         Once the project file has been modified, you can use the command 
  3316.         line compiler or the integrated environment to test your changes.
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.                                                            Page: 54
  3350.                                                      The Window BOSS
  3351.  
  3352.  
  3353.  
  3354.         Making Changes - continued.
  3355.  
  3356.  
  3357.  
  3358.         TopSpeed C Continued.
  3359.  
  3360.         If you have the Source media kit and would prefer to create new 
  3361.         libraries the following general procedure can be used.
  3362.              
  3363.           1) Make sure that ALL of The Window BOSS "C" and "ASSEMBLER" 
  3364.              source files have been extracted from their respective 
  3365.              archives.
  3366.  
  3367.              Make sure the following files are in the same directory as 
  3368.              The Window BOSS source files:
  3369.  
  3370.                   MAKESWIN.PR                   MAKEMWIN.PR 
  3371.                   MAKECWIN.PR                   MAKELWIN.PR
  3372.                   MAKEXWIN.PR                   MAKEMTWI.PR 
  3373.  
  3374.                   ?MSVLIB.OBJ                   MTMSVLIB.OBJ
  3375.  
  3376.           2) If applicable, edit "MSVLIB.ASM" as needed.  Be sure to set 
  3377.              LPROG and LDATA correctly.  ASSEMBLE by using the command:
  3378.  
  3379.                        C>MASM /MX MSVLIB;
  3380.  
  3381.              Model   SMALL   MEDIUM   COMPACT   LARGE   XLARGE   MTHREAD
  3382.  
  3383.              LPROG   FALSE   TRUE     FALSE     TRUE    TRUE     TRUE
  3384.              LDATA   FALSE   FALSE    TRUE      TRUE    TRUE     TRUE
  3385.  
  3386.              Name   SMSVLIB  MMSVLIB  CMSVLIB   LMSVLIB XMSVLIB  MTVLIB
  3387.  
  3388.          3) If Applicable, edit the "C" level modules.  
  3389.  
  3390.          4) Use the command line compiler create the new library....
  3391.  
  3392.              Memory Model   Command line        Produces
  3393.              ------------   ------------        --------
  3394.  
  3395.              SMALL          TSC MAKESWIN /M     SWIN.LIB
  3396.              MEDIUM         TSC MAKEMWIN /M     MWIN.LIB
  3397.              COMPACT        TSC MAKECWIN /M     CWIN.LIB
  3398.              LARGE          TSC MAKELWIN /M     LWIN.LIB
  3399.              XLARGE         TSC MAKEXWIN /M     XWIN.LIB
  3400.              MTHREAD        TSC MAKEMTWI /M     MTWI.LIB
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.                                                            Page: 55
  3411.                                                      The Window BOSS
  3412.  
  3413.  
  3414.  
  3415.         Making Changes - continued.
  3416.  
  3417.  
  3418.         9.4. Microsoft, Borland, Watcom  
  3419.         9.5. Zortech, Lattice, Mix Power C
  3420.  
  3421.              1) If applicable, edit the assembler level modules as 
  3422.                 needed.  Be sure to set LPROG and LDATA (if they apply).  
  3423.                 ASSEMBLE.
  3424.  
  3425.              2) If applicable, edit the "C" level modules.  COMPILE.
  3426.  
  3427.              3) Test your changes by linking the new/modified code 
  3428.                 with the existing libraries. For example to link your 
  3429.                 modified wn_move.c and v_getch:  (Microsoft example)
  3430.  
  3431.                   C> link myapp+wn_move+msvlib,,,swin
  3432.                 
  3433.                 If required, refer to your compiler documentation for 
  3434.                 explicit instructions on linking.
  3435.                                
  3436.              4) Update the existing Window BOSS libraries with the new 
  3437.                 "obj" files.  This is done with the librarian provided 
  3438.                 with your compiler.  Alternatively, you can use the batch 
  3439.                 files provided with the source code to recompile the 
  3440.                 entire library and rebuild, rather than update The 
  3441.                 Window BOSS libraries.
  3442.  
  3443.                 If required, refer to your compiler documentation for 
  3444.                 explicit instructions on how to use their librarians to 
  3445.                 update libraries.
  3446.  
  3447.         Remember, the memory model of the assembly "obj" file must 
  3448.         correspond to the memory model of the C "obj" files and the 
  3449.         memory model of any existing libraries. 
  3450.  
  3451.         9.5.1. Assembly Language Object Files
  3452.  
  3453.         The Source Media Kit now includes the object files of the 
  3454.         assembly language functions used by The Window BOSS. This will 
  3455.         free you from having to acquire, or use, an assembler unless you 
  3456.         intend to make changes to those functions written in assembly 
  3457.         language!  Now, all you have to do is copy and or rename the 
  3458.         appropriate object file before running the "MAKELIB" batch file!  
  3459.         A object file matrix is provided to assist you in determining 
  3460.         which object file should be used with which compiler and memory 
  3461.         model.
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.                                                            Page: 56
  3472.                                                      The Window BOSS
  3473.  
  3474.  
  3475.  
  3476.         Making Changes - continued.
  3477.  
  3478.  
  3479.         9.5.2. Assembly Language Object File Matrix
  3480.  
  3481.         The matrix that follows identifies the relationship between the 
  3482.         object filename, compiler memory model, and the filename used as 
  3483.         part of the "MAKELIB" batch utility provided as part of The 
  3484.         Window BOSS.  Use this matrix to determine what file to rename 
  3485.         (or copy) when recreating Window BOSS libraries that DO NOT 
  3486.         include any changes or additions to existing assembly language 
  3487.         functions.
  3488.                        
  3489.                                Object File Matrix
  3490.  
  3491.         Compiler     SMALL     MEDIUM   COMPACT  LARGE      MAKELIB NAME
  3492.  
  3493.         QuickC 2.5   SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3494.         MSC 6.X      SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3495.         Turbo C++    STCVLIB   MTCVLIB  CTCVLIB  LTCVLIB    TCVLIB.OBJ
  3496.         Borland C++  STCVLIB   MTCVLIB  CTCVLIB  LTCVLIB    TCVLIB.OBJ
  3497.         Watcom       SWCVLIB   MWCVLIB  CWCVLIB  LWCVLIB    WCVLIB.OBJ
  3498.         Lattice 6    SVLIB     PVLIB    DVLIB    LVLIB      VLIB.OBJ
  3499.         Zortech      SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3500.         MIX          SPCVLIB   MPCVLIB  -------  LPCVLIB    PCVLIB.MIX
  3501.  
  3502.         Example: Rebuild the Large model library for Microsoft C 6.X, or 
  3503.         Quick C.  
  3504.  
  3505.         You would:
  3506.  
  3507.              (1) Use LCOMPILE to compile all C functions
  3508.  
  3509.                        C>LCOMPILE
  3510.  
  3511.              (2) Copy LMSVLIB.OBJ to MSVLIB.OBJ
  3512.  
  3513.                        C>COPY LMSVLIB.OBJ MSVLIB.OBJ
  3514.              
  3515.              (3) Rebuild the LARGE model library 
  3516.  
  3517.                        C>MAKELIB LWIN
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.                                                            Page: 57
  3533.                                                      The Window BOSS
  3534.  
  3535.  
  3536.  
  3537.         Making Changes - continued.
  3538.  
  3539.  
  3540.         Borland C++ and Turbo C++
  3541.  
  3542.         The HUGE memory model generally requires the same object file as 
  3543.         the LARGE. Turbo C++ is the exception (use HTCVLIB.OBJ).  The 
  3544.         following table outlines the values that LPROG, LDATA, and HUGE 
  3545.         need to have assigned for the various memory models.  This 
  3546.         information is provided for those who need to modify the assembly 
  3547.         language files to incorporate their local changes.
  3548.               
  3549.              Memory Model                    LPROG   LDATA   HUGE  *
  3550.              SMALL   (64k Code, 64k Data)    FALSE   FALSE   FALSE
  3551.              MEDIUM  (1MB Code, 64k Data)    TRUE    FALSE   FALSE
  3552.              COMPACT (64k Code, 1MB Data)    FALSE   TRUE    FALSE
  3553.              LARGE   (1MB Code, 1MB Data)    TRUE    TRUE    FALSE
  3554.              HUGE    (1MB Code, 1MB Data) *  TRUE    TRUE    TRUE
  3555.  
  3556.              * HUGE is only defined in TCVLIB.ASM.  The HUGE memory 
  3557.                model allows arrays to exceed 64k.
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.                                                            Page: 58
  3594.                                                      The Window BOSS
  3595.  
  3596.  
  3597.  
  3598.         Making Changes - continued.
  3599.  
  3600.  
  3601.         9.5.3. Assembler Code
  3602.  
  3603.           Selecting the Memory Model:
  3604.  
  3605.              Lattice
  3606.  
  3607.                 1) vlib.asm     Edit - Set LATTICE to 1 for Lattice.
  3608.                                 DOS.MAC determines the memory model.
  3609.  
  3610.              Microsoft C, QuickC, Borland C & Turbo C, Watcom C, Zortech
  3611.  
  3612.                 1) msvlib.asm   Set LDATA & LPROG to TRUE or FALSE 
  3613.                    tcvlib.asm   according to the following
  3614.                    wcvlib.asm   LDATA is TRUE for LARGE DATA
  3615.                                 LPROG is TRUE for LARGE CODE
  3616.                                 Assemble using:
  3617.                                   MASM /MX MSVLIB;   <- All but WATCOM
  3618.                                   MASM /MX WCVLIB;   <- WATCOM ONLY
  3619.  
  3620.              MIX Power C
  3621.  
  3622.                 1) pcvlib.asm   Set LDATA to FALSE, LPROG to TRUE
  3623.                                 Assemble using:
  3624.                                       MASM /ML PCVLIB;
  3625.  
  3626.                                 Run the MIX utility on PCVLIB.OBJ
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.                                                            Page: 59
  3655.                                                      The Window BOSS
  3656.  
  3657.  
  3658.  
  3659.         Making Changes - continued.
  3660.  
  3661.  
  3662.  
  3663.         9.6. C Code
  3664.  
  3665.         Pattern your enhancements after existing code.  The most common 
  3666.         mistakes are: (1) failing to call wn_activate, (2) failing to 
  3667.         check for error returns, and (3) failing to rebuild the libraries 
  3668.         correctly.
  3669.  
  3670.         Incorporating custom data entry functions is a straight forward 
  3671.         task if you follow the guidelines below.
  3672.  
  3673.              . Pattern your data entry routine after wn_gfloat.
  3674.  
  3675.              . Study the relationship between wn_gfloat and wn_frmget. 
  3676.  
  3677.              . Study the way in which arguments are loaded using the 
  3678.                unions v1 through v8.
  3679.  
  3680.              . Edit winboss.h and expand the table of data entry function 
  3681.                codes to include a new code above 100, for example:
  3682.  
  3683.                        #define GCUSTOM  101
  3684.  
  3685.                The table of data entry function codes is located towards 
  3686.                the tail end of "winboss.h" and begins with:
  3687.  
  3688.                        #define GDONE    0
  3689.  
  3690.              . Edit wn_frmget.c and expand the large case statement to 
  3691.                include a case for your custom data entry function.  
  3692.                Pattern the code you are adding after the existing code.
  3693.  
  3694.              . Rebuild the libraries adding your custom function and 
  3695.                replacing wn_frmget with the new version.
  3696.  
  3697.         Refer to wn_gfloat and wn_frmget....
  3698.  
  3699.              The general logic is to call the data entry function with 
  3700.              the argument list corresponding to this occurrence of this 
  3701.              type of field. The data entry function tests the value of 
  3702.              "fun". If it is "XEQ" then control immediately passes to the 
  3703.              logic that handles data entry.  If fun is "SET" then the 
  3704.              data entry function loads the form control block (indexed by 
  3705.              "fld") with the arguments being passed. This sets the stage 
  3706.              for subsequent calls (in a predetermined order) from 
  3707.              wn_frmget! When called, wn_frmget first displays all the 
  3708.              prompt fields, and then calls the data entry functions in 
  3709.              the order determined by the form control block.
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.                                                            Page: 60
  3716.                                                      The Window BOSS
  3717.  
  3718.  
  3719.  
  3720.         10. Function Call Synopsis
  3721.  
  3722.  
  3723.  
  3724.  
  3725.  
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.                  The Window BOSS and Data Clerk Function Library
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.                                                            Page: 61
  3777.                                                      The Window BOSS
  3778.  
  3779.  
  3780.  
  3781.         10.1. wn_init -- init window system
  3782.         10.2. wn_exit -- exit window system
  3783.         10.3. wn_psinit() -- init window system - physical size
  3784.  
  3785.         USAGE
  3786.  
  3787.           wn_init()
  3788.  
  3789.           wn_psinit(rows, columns)
  3790.           int rows, columns
  3791.  
  3792.              rows = # of rows on physical screen
  3793.              cols = # of columns on physical screen
  3794.  
  3795.           wn_exit()
  3796.  
  3797.           wn_init() or wn_psinit() and wn_exit(), if used, should be the 
  3798.           first and last functions called. Both wn_init() and wn_psinit() 
  3799.           save the video state and application entry screen.  wn_init() 
  3800.           or wn_psinit() is typically the very first function called in 
  3801.           the main program. wn_exit() restores the saved video state and 
  3802.           screen image.  wn_exit() is typically called just prior to 
  3803.           calling exit().
  3804.  
  3805.           wn_init() is the general case of wn_psinit().  It assumes a 
  3806.           physical screen size of 25x80 and therefore is the most 
  3807.           portable across video adapters.
  3808.  
  3809.           wn_psinit() allows those who need to use either the EGA 43x80
  3810.           or VGA 50x80 line modes a handy way to save the existing 43 or 
  3811.           50 line screen image.  Examples:
  3812.  
  3813.              wn_psinit(43,80);             /* saves 43 line EGA screen */
  3814.              wn_psinit(50,80);             /* saves 50 line VGA screen */
  3815.           
  3816.         RETURNS
  3817.  
  3818.           TRUE if successful, FALSE if error.
  3819.  
  3820.         CAUTIONS and ADDITIONAL NOTES
  3821.  
  3822.           wn_psinit() does not check to see if the parameters passed are 
  3823.           valid for the adapter in use.
  3824.  
  3825.           wn_psinit() does not change video modes based on the parameters 
  3826.           passed.  It is the programmers responsibility to insure that 
  3827.           the video adapter is in the correct mode for the application.
  3828.  
  3829.           Calling wn_psinit() with parameters greater than can be handled 
  3830.           by the machines video adapter can have interesting but 
  3831.           undesirable results.
  3832.  
  3833.           Use of wn_psinit() should be restricted to machines equipped 
  3834.           with EGA or VGA adapters only.
  3835.  
  3836.  
  3837.                                                            Page: 62
  3838.                                                      The Window BOSS
  3839.  
  3840.  
  3841.  
  3842.         10.4. wn_dmode -- set window display mode
  3843.  
  3844.         USAGE
  3845.  
  3846.           wn_dmode(mode)
  3847.           int mode
  3848.  
  3849.                   mode = PAINT for painted windows
  3850.                   mode = FLASH for instant windows
  3851.  
  3852.           wn_dmode sets the windows display mode as per mode, PAINT style 
  3853.           windows appear to be painted (top to bottom) where FLASH style 
  3854.           windows instantly appear.
  3855.  
  3856.         RETURNS
  3857.  
  3858.           Nothing.
  3859.  
  3860.         CAUTIONS and ADDITIONAL NOTES
  3861.  
  3862.           CGA, EGA, and VGA only. Updates are made directly to video 
  3863.           memory.
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.                                                            Page: 63
  3899.                                                      The Window BOSS
  3900.  
  3901.  
  3902.  
  3903.         10.5. wn_open -- open window 
  3904.  
  3905.         USAGE
  3906.  
  3907.           wn = (WINDOWPTR)wn_open(page, row, col, width, height, atrib,
  3908.                 batrib)
  3909.           int page, row, col, width, height, atrib, batrib;
  3910.  
  3911.                 page -  0 500, 510, 800, or 1000
  3912.                         1000 opens a borderless page
  3913.                          800 opens an exploding window
  3914.                          510 opens a window with transparent shadows
  3915.                          500 opens a window with black shadows
  3916.                            0 opens a bordered window (NORMAL)
  3917.                 row  -  row of upper left hand corner of the window
  3918.                 col  -  column of upper left hand corner of the window
  3919.                 width - INSIDE dimension (max value is 78 for a 80 column 
  3920.                         wide display, 80 if borderless)
  3921.                 height- INSIDE dimension (max value is 23 for a 25 row 
  3922.                         high display, 25 if borderless)
  3923.                 atrib - attribute to be used IN the window
  3924.                 batrib- attribute to be used for the border
  3925.  
  3926.           wn_open is usually the first function called to create and use 
  3927.           a window.  wn_open dynamically allocates memory to save the 
  3928.           area defined (by row, col, width, and height), saves the image, 
  3929.           opens the window and homes the logical cursor to row 0, col 0 
  3930.           of the window.  The window is now ready to be used by the 
  3931.           various window management routines.  
  3932.  
  3933.           Attributes (COLORS) are defined in winboss.h.
  3934.  
  3935.         RETURNS
  3936.  
  3937.           wn = window handle or NULL if error (no memory and/or bad 
  3938.           parameters can cause NULL returns)
  3939.  
  3940.         CAUTIONS and ADDITIONAL NOTES
  3941.  
  3942.           Width and height are inside dimensions. If you want a NORMAL 
  3943.           window with a work area of 10 rows and 5 columns, the width is 
  3944.           7 and the height is 12.  Maximum values are linked to the 
  3945.           actual physical screen size and are dependent upon whether or 
  3946.           not a borderless window is being opened.  The window, its 
  3947.           borders (if they exist), and its shadow (if it exists) must all 
  3948.           fit and be visible on the physical screen.
  3949.           
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.                                                            Page: 64
  3960.                                                      The Window BOSS
  3961.  
  3962.  
  3963.  
  3964.         wn_open - continued.
  3965.  
  3966.  
  3967.  
  3968.           The flashing cursor will not be displayed unless wn_sync() has 
  3969.           been called with a value of TRUE.  
  3970.  
  3971.           The window "wn" automatically becomes the top window tile upon 
  3972.           return.
  3973.  
  3974.           Exploding windows are linked to the time of day clock.  This is 
  3975.           done by reading the time of day (in ticks) directly from low 
  3976.           memory.  If you would like to vary the explosion time it can be 
  3977.           done by calling the internal routine "wns_stdiv" with a long 
  3978.           integer constant in the range of 1 to 10.  The default value is 
  3979.           5L.  Increasing the value will cause the explosion to be 
  3980.           faster.  For example:
  3981.  
  3982.                                  wns_stdiv(10L);
  3983.  
  3984.           Window types can not be combined.  That is to say that you can 
  3985.           not have shadowed borderless windows, borderless exploding 
  3986.           windows, or exploding windows with shadows.
  3987.  
  3988.           Windows with transparent shadows should not be moved, hidden, 
  3989.           then accessed. This limitation is due to the fact that the 
  3990.           transparent shadow area is treated as if it were the contents 
  3991.           of a window and is therefore preserved as the window it is 
  3992.           attached to is manipulated.  In some cases, this causes the 
  3993.           transparent shadow area to appear invalid.  This restriction 
  3994.           does not apply to windows with black shadows.
  3995.  
  3996.         See Also - wn_psinit and wn_init
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.                                                            Page: 65
  4021.                                                      The Window BOSS
  4022.  
  4023.  
  4024.  
  4025.         10.6. wn_title -- title window
  4026.  
  4027.         USAGE
  4028.  
  4029.           wn_title(wn,title)
  4030.           WINDOWPTR wn;
  4031.           char *title;
  4032.  
  4033.                 wn    - window handle
  4034.                 title - string pointer to title
  4035.  
  4036.           The title is displayed on the top border of the window using 
  4037.           the currently defined border attribute.  The cursor is 
  4038.           positioned off the screen after the title is written.  
  4039.  
  4040.         RETURNS
  4041.  
  4042.           TRUE if all is well, NULL if the title is to large to fit on 
  4043.           the top border or error.
  4044.  
  4045.         CAUTIONS and ADDITIONAL NOTES
  4046.  
  4047.           The window "wn" automatically becomes the top window tile upon 
  4048.           return.
  4049.  
  4050.  
  4051.  
  4052.         10.7. wn_titla -- title window with attribute
  4053.  
  4054.         USAGE
  4055.  
  4056.           wn_titla(wn,title,atrib)
  4057.           WINDOWPTR wn;
  4058.           char *title;
  4059.           int atrib;
  4060.  
  4061.                 wn    - window handle
  4062.                 title - string pointer to title
  4063.                 atrib - attribute to use for text
  4064.  
  4065.           The title is displayed on the top border of the window using 
  4066.           the attribute specified by atrib.  The cursor is positioned off 
  4067.           the screen after the title is written.  
  4068.  
  4069.         RETURNS
  4070.  
  4071.           TRUE if all is well, NULL if the title is to large to fit on 
  4072.           the top border or error.
  4073.  
  4074.         CAUTIONS and ADDITIONAL NOTES
  4075.  
  4076.           The window "wn" automatically becomes the top window tile upon 
  4077.           return.
  4078.  
  4079.  
  4080.  
  4081.                                                            Page: 66
  4082.                                                      The Window BOSS
  4083.  
  4084.  
  4085.  
  4086.         10.8. wn_stitle -- super title window
  4087.  
  4088.         USAGE
  4089.  
  4090.           wn_title(wn,title,location)
  4091.           WINDOWPTR wn;
  4092.           char *title;
  4093.           int location;
  4094.  
  4095.                 wn    -    window handle
  4096.                 title -    string pointer to title
  4097.                 location - border location
  4098.  
  4099.             Location can be any of the following (defined in winboss.h):
  4100.  
  4101.                 WNTOPR  - top right 
  4102.                 WNTOPL  - top left 
  4103.                 WNTOPC  - top center 
  4104.                 WNBOTR  - bottom right 
  4105.                 WNBOTL  - bottom left 
  4106.                 WNBOTC  - bottom center 
  4107.  
  4108.           The title is displayed on the border at the location specified 
  4109.           using the currently defined border attribute.  The cursor is 
  4110.           positioned off the screen after the title is written.  
  4111.  
  4112.         RETURNS
  4113.  
  4114.           TRUE if all is well, NULL if the title is to large to fit on 
  4115.           the border.
  4116.  
  4117.         CAUTIONS and ADDITIONAL NOTES
  4118.  
  4119.           The window "wn" automatically becomes the top window tile upon 
  4120.           return.
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.                                                            Page: 67
  4143.                                                      The Window BOSS
  4144.  
  4145.  
  4146.  
  4147.         10.9. wn_stitla -- super title window with attribute
  4148.  
  4149.         USAGE
  4150.  
  4151.           wn_stitla(wn,title,atrib,location)
  4152.           WINDOWPTR wn;
  4153.           char *title;
  4154.           int atrib;
  4155.           int location;
  4156.  
  4157.                 wn    - window handle
  4158.                 title - string pointer to title
  4159.                 atrib - attribute to use for text
  4160.                 location - border location
  4161.  
  4162.             Location can be any of the following (defined in winboss.h):
  4163.  
  4164.                 WNTOPR  - top right 
  4165.                 WNTOPL  - top left 
  4166.                 WNTOPC  - top center 
  4167.                 WNBOTR  - bottom right 
  4168.                 WNBOTL  - bottom left 
  4169.                 WNBOTC  - bottom center 
  4170.  
  4171.  
  4172.           The title is displayed on the border at the location specified 
  4173.           using the using the attribute specified by atrib.  The cursor 
  4174.           is positioned off the screen after the title is written.  
  4175.  
  4176.         RETURNS
  4177.  
  4178.           TRUE if all is well, NULL if the title is to large to fit on 
  4179.           the border.
  4180.  
  4181.         CAUTIONS and ADDITIONAL NOTES
  4182.  
  4183.           The window "wn" automatically becomes the top window tile upon 
  4184.           return.
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.                                                            Page: 68
  4204.                                                      The Window BOSS
  4205.  
  4206.  
  4207.  
  4208.         10.10. wn_close -- close window
  4209.  
  4210.         USAGE
  4211.  
  4212.           wn_close(wn) 
  4213.           WINDOWPTR wn; 
  4214.  
  4215.                 wn - handle of a previously opened window.
  4216.  
  4217.           wn_close removes the window specified by wn and restores the 
  4218.           screen area under the window to its previous contents.  The 
  4219.           memory allocated by wn_open is returned to the free list.  The 
  4220.           cursor is positioned to where it was located prior to the 
  4221.           wn_open call.  
  4222.  
  4223.         RETURNS 
  4224.  
  4225.           TRUE or NULL if error
  4226.  
  4227.         CAUTIONS and ADDITIONAL NOTES 
  4228.  
  4229.           None.
  4230.  
  4231.  
  4232.  
  4233.         10.11. wn_save -- save screen image 
  4234.  
  4235.         USAGE
  4236.  
  4237.           wn = (WINDOWPTR)wn_save(page, row, col, width, height)
  4238.           int page, row, col, width, height;
  4239.  
  4240.                 page -  always 0.
  4241.                 row  -  row of upper left hand corner of the window
  4242.                 col  -  column of upper left hand corner of the window
  4243.                 width - INSIDE dimension (max value is 78)
  4244.                 height- INSIDE dimension (max value is 23)
  4245.  
  4246.           wn_save can be used to save areas of the screen for purposes 
  4247.           other than windows.  
  4248.  
  4249.           Memory for the screen image is dynamically allocated.
  4250.  
  4251.         RETURNS
  4252.  
  4253.           wn = window handle or NULL if error
  4254.  
  4255.         CAUTIONS and ADDITIONAL NOTES
  4256.  
  4257.           The window handle returned by wn_save should only be used with 
  4258.           wn_restore. Use with other routines could produce unpredictable 
  4259.           results.
  4260.  
  4261.  
  4262.  
  4263.  
  4264.                                                            Page: 69
  4265.                                                      The Window BOSS
  4266.  
  4267.  
  4268.  
  4269.         10.12. wn_restore -- restore saved screen image
  4270.  
  4271.         USAGE
  4272.  
  4273.           wn_restore(wn)
  4274.           WINDOWPTR wn;
  4275.  
  4276.                 wn - handle of previously wn_save(ed) window.
  4277.  
  4278.           Restores the screen image corresponding to the window handle 
  4279.           wn, and allocated memory is returned to the free list.
  4280.  
  4281.         RETURNS
  4282.  
  4283.           TRUE or NULL if error
  4284.  
  4285.         CAUTIONS and ADDITIONAL NOTES
  4286.  
  4287.           This function should only be used with window handles obtained 
  4288.           from wn_save.
  4289.  
  4290.  
  4291.  
  4292.         10.13. wn_move -- move window
  4293.  
  4294.         USAGE
  4295.  
  4296.           wn = (WINDOWPTR)wn_move(wn,row,col)
  4297.  
  4298.                 wn -  handle of window to be moved
  4299.                 row - destination row
  4300.                 col - destination column
  4301.  
  4302.           Moves the window corresponding to wn to a new location.  The 
  4303.           cursor is positioned off the screen after the call.  
  4304.  
  4305.         RETURNS
  4306.  
  4307.           Window handle of the window moved or NULL if error.
  4308.  
  4309.         CAUTIONS and ADDITIONAL NOTES
  4310.  
  4311.           The window "wn" automatically becomes the top window tile upon 
  4312.           return.
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.                                                            Page: 70
  4326.                                                      The Window BOSS
  4327.  
  4328.  
  4329.  
  4330.         10.14. wn_locate -- locate cursor in window
  4331.  
  4332.         USAGE
  4333.  
  4334.           wn_locate(wn, row, col)
  4335.           WINDOWPTR wn;
  4336.           int row, col;
  4337.  
  4338.                 wn  - window handle
  4339.                 row - row to position to (relative to window origin)
  4340.                 col - column to position to (relative to window origin)
  4341.  
  4342.           Position the cursor to the row and column specified.  Row and  
  4343.           Column values are relative to the origin of the window (0,0 
  4344.           locates the cursor in the upper left hand corner of the window 
  4345.           referenced by wn).
  4346.  
  4347.         RETURNS
  4348.  
  4349.           TRUE or NULL if error
  4350.  
  4351.         CAUTIONS and ADDITIONAL NOTES
  4352.  
  4353.           Values of row & col are not checked.
  4354.  
  4355.           The window "wn" automatically becomes the top window tile upon 
  4356.           return.
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.                                                            Page: 71
  4387.                                                      The Window BOSS
  4388.  
  4389.  
  4390.  
  4391.         10.15. wn_printf -- window printf
  4392.  
  4393.         USAGE
  4394.  
  4395.           wn_printf(wn, cs, args)
  4396.           WINDOWPTR wn;
  4397.           char *cs;
  4398.           ?? arg1 ... argn;
  4399.  
  4400.                 wn   - window handle
  4401.                 cs   - format control string
  4402.                 args - argument list
  4403.  
  4404.           printf function for windows!
  4405.  
  4406.         RETURNS
  4407.  
  4408.           TRUE or NULL if error
  4409.  
  4410.         CAUTIONS and ADDITIONAL NOTES
  4411.  
  4412.           Output string length is limited to 254 bytes.
  4413.  
  4414.           Registered users can edit the wn_printf function and set the 
  4415.           limit to whatever they wish.
  4416.  
  4417.           Integer only for Microsoft 3.0 and Aztec.  This limitation 
  4418.           be overcome by using sprintf in conjunction with wn_printf.  
  4419.           For example:
  4420.  
  4421.                   char buf[256];
  4422.                        ..
  4423.                        ..
  4424.                   sprintf(buf,"%d %l %x\n", intval, longval, hexval);
  4425.                   wn_printf(wn, buf);
  4426.  
  4427.           Full support for all others.  
  4428.  
  4429.           The window "wn" automatically becomes the top window tile upon 
  4430.           return.
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.                                                            Page: 72
  4448.                                                      The Window BOSS
  4449.  
  4450.  
  4451.  
  4452.         10.16. wn_puts -- put string (high speed)
  4453.         10.17. wn_putc -- put character 
  4454.  
  4455.         USAGE
  4456.  
  4457.           wn_puts(wn, row, col, string)
  4458.           WINDOWPTR wn;
  4459.           int row, col;
  4460.           char *string;
  4461.  
  4462.           wn_putc(wn, row, col, c)
  4463.           WINDOWPTR wn;
  4464.           int row, col;
  4465.           char c;
  4466.              
  4467.                 wn -    window handle
  4468.                 row -   row to print the string at
  4469.                 col -   column to print the string at
  4470.                 string- the string to print
  4471.                 c -     the character to print
  4472.  
  4473.           Row and Col are relative to the origin of the window.
  4474.  
  4475.           The cursor is displayed only if wn_synflg has been called with 
  4476.           a value of TRUE.
  4477.  
  4478.         RETURNS
  4479.  
  4480.           TRUE or NULL if error
  4481.  
  4482.         CAUTIONS and ADDITIONAL NOTES
  4483.  
  4484.           wn_puts writes the string directly to the video ram. Tabs, line 
  4485.           feeds, carriage returns and other control characters are not 
  4486.           filtered or processed in any way.
  4487.  
  4488.           Range checks are not performed to insure the specified string 
  4489.           can be contained in the window.  
  4490.  
  4491.           The window "wn" automatically becomes the top window tile upon 
  4492.           return.
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504.  
  4505.  
  4506.  
  4507.  
  4508.                                                            Page: 73
  4509.                                                      The Window BOSS
  4510.  
  4511.  
  4512.  
  4513.         10.18. wn_gets -- get string with validation
  4514.  
  4515.         USAGE
  4516.  
  4517.           (char *) wn_gets(wn, buf, va, uva)
  4518.           WINDOWPTR wn;
  4519.           char *buf;
  4520.           int va;
  4521.           char *uva;
  4522.  
  4523.                 wn -    window handle
  4524.                 buf -   user buffer for string
  4525.                 va -    input validation to be used
  4526.                 uva -   user validation list [optional]
  4527.  
  4528.           va specifies the type of input validation to be performed as 
  4529.           data is being entered. Options are:
  4530.  
  4531.                 (1) none                no restrictions - accept everything
  4532.                 (2) integer             accept: 0 thru 9 + -
  4533.                 (3) floating point      accept: 0 thru 9 + - .
  4534.                 (4) alpha only          accept: a thru z 
  4535.                                         (upper & lower case)
  4536.                 (5) upper case only     accept: A thru Z 
  4537.                 (6) validation list     accept: only those characters
  4538.                     (optional)                  specified via uva string.
  4539.  
  4540.                 ORing va with 0x8000 disables data entry character echo.
  4541.  
  4542.           The following editing functions are supported:
  4543.  
  4544.                 . backspace & rubout do the logical things
  4545.                 . ^U, ^X, and ^C wipe the field clean
  4546.                 . Return and Esc end the input function 
  4547.  
  4548.           Data entry takes place at the current logical cursor location. 
  4549.           You  can, of course, position the cursor to where you wish 
  4550.           prior to calling wn_gets.
  4551.  
  4552.           Example:
  4553.  
  4554.                 wn_printf(wn,"Enter your name > ");
  4555.                 wn_gets(wn,buf,4,0);
  4556.  
  4557.         RETURNS
  4558.  
  4559.           Pointer to buf or NULL if error
  4560.  
  4561.         CAUTIONS and ADDITIONAL NOTES
  4562.  
  4563.           The window "wn" automatically becomes the top window tile upon   
  4564.           return.  This function is provided for historical purposes, 
  4565.           more complete and flexible functions are included as part of 
  4566.           the Data Clerk.
  4567.  
  4568.  
  4569.                                                            Page: 74
  4570.                                                      The Window BOSS
  4571.  
  4572.  
  4573.  
  4574.         10.19. wn_putsa -- put string and attribute (high speed)
  4575.         10.20. wn_putca -- put character and attribute
  4576.  
  4577.         USAGE
  4578.  
  4579.           wn_putsa(wn, row, col, string, atrib)
  4580.           WINDOWPTR wn;
  4581.           int row, col;
  4582.           char *string;
  4583.           int atrib;
  4584.  
  4585.           wn_putca(wn, row, col, c, atrib)
  4586.           WINDOWPTR wn;
  4587.           int row, col;
  4588.           char c;
  4589.           int atrib;
  4590.  
  4591.                 wn -    window handle
  4592.                 row -   row to print the string at
  4593.                 col -   column to print the string at
  4594.                 string- the string to print
  4595.                 c -     the character to print
  4596.                 atrib - attribute to be used with string
  4597.  
  4598.           Row and Col are relative to the origin of the window.
  4599.  
  4600.           The cursor is displayed only if wn_synflg has been called with 
  4601.           a value of TRUE.
  4602.  
  4603.         RETURNS
  4604.  
  4605.           TRUE or NULL if error
  4606.  
  4607.         CAUTIONS and ADDITIONAL NOTES
  4608.  
  4609.           wn_puts writes the string directly to the video ram. Tabs, line 
  4610.           feeds, carriage returns and other control characters are not 
  4611.           filtered or processed in any way.
  4612.  
  4613.           Range checks are not performed to insure the specified string 
  4614.           can be contained in the window.  
  4615.  
  4616.           The window "wn" automatically becomes the top window tile upon 
  4617.           return.
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.                                                            Page: 75
  4631.                                                      The Window BOSS
  4632.  
  4633.  
  4634.  
  4635.         wn_getca -- get character and attribute from window
  4636.  
  4637.         USAGE
  4638.  
  4639.           unsigned int wn_getca(wn, row, col)
  4640.           WINDOWPTR wn;
  4641.           int row, col;
  4642.  
  4643.                 wn -    window handle
  4644.                 row -   row to fetch character/attribute from 
  4645.                 col -   column to fetch character/attribute from 
  4646.  
  4647.           Row and Col are relative to the origin of the window.
  4648.  
  4649.           The cursor is displayed only if wn_synflg has been called with 
  4650.           a value of TRUE.
  4651.  
  4652.         RETURNS
  4653.  
  4654.           The character attribute pair.  Attribute in the upper 8 bits, 
  4655.           character in the lower 8 bits.
  4656.  
  4657.         CAUTIONS and ADDITIONAL NOTES
  4658.  
  4659.           wn_getca calls _getca.
  4660.  
  4661.           The window "wn" automatically becomes the top window tile upon 
  4662.           return.
  4663.  
  4664.           Range checks are not performed.
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.                                                            Page: 76
  4692.                                                      The Window BOSS
  4693.  
  4694.  
  4695.  
  4696.         10.21. wn_insrow -- insert row in window
  4697.  
  4698.         USAGE
  4699.  
  4700.           wn_insrow(wn, row)
  4701.           WINDOWPTR wn;
  4702.           int row;
  4703.  
  4704.                 wn -  window handle
  4705.                 row - row at which a line is to be inserted
  4706.  
  4707.           Row is relative to the origin of the window.  All lines below 
  4708.           the row specified are scrolled down.  The currently defined 
  4709.           window attribute is used to clear the lines inserted.  
  4710.  
  4711.         RETURNS
  4712.  
  4713.           TRUE or NULL if error
  4714.  
  4715.         CAUTIONS and ADDITIONAL NOTES
  4716.  
  4717.           The window "wn" automatically becomes the top window tile upon 
  4718.           return.
  4719.  
  4720.  
  4721.  
  4722.         10.22. wn_delrow -- delete row from window
  4723.  
  4724.         USAGE
  4725.  
  4726.           wn_delrow(wn, row)
  4727.           WINDOWPTR wn;
  4728.           int row;
  4729.  
  4730.                 wn -  window handle
  4731.                 row - row at which a line is to be deleted
  4732.  
  4733.           Row is relative to the origin of the window.  All lines below 
  4734.           the row specified are scrolled up. The currently defined window 
  4735.           attribute is used to clear the lines inserted.  
  4736.  
  4737.         RETURNS
  4738.  
  4739.           TRUE or NULL if error
  4740.  
  4741.         CAUTIONS and ADDITIONAL NOTES
  4742.  
  4743.           The window "wn" automatically becomes the top window tile upon 
  4744.           return.
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.                                                            Page: 77
  4753.                                                      The Window BOSS
  4754.  
  4755.  
  4756.  
  4757.         10.23. wn_clr -- window: clear entire window
  4758.         10.24. wn_clrrow -- window: clear single row 
  4759.         10.25. wn_clreol -- window: clear cursor to end of line
  4760.         10.26. wn_clreow -- window: clear cursor to end of window
  4761.  
  4762.         USAGE
  4763.  
  4764.           wn_clr(wn)
  4765.           wn_clrrow(wn,row)
  4766.           wn_clreol(wn,row,col)
  4767.           wn_clreow(wn,row,col);
  4768.  
  4769.           WINDOWPTR wn;
  4770.           int row, col;
  4771.            
  4772.                 wn - window handle
  4773.                 row - row in window where clear function begins
  4774.                 col - column in window where clear function begins
  4775.           
  4776.         RETURNS
  4777.  
  4778.           TRUE or NULL if error
  4779.  
  4780.         CAUTIONS and ADDITIONAL NOTES
  4781.  
  4782.           The window "wn" automatically becomes the top window tile upon 
  4783.           return.
  4784.  
  4785.           The currently defined window attribute is used to clear the 
  4786.           interior portion of the window.  
  4787.  
  4788.           wn_clr homes the virtual cursor other functions position cursor 
  4789.           to the location specified by row and col.
  4790.  
  4791.         10.27. wn_activate -- activate window
  4792.  
  4793.         USAGE
  4794.  
  4795.           wn_activate(wn)
  4796.           WINDOWPTR wn;
  4797.  
  4798.              wn - window handle
  4799.  
  4800.           Activate a previously opened window.  The window specified by 
  4801.           "wn" becomes the top window tile.
  4802.  
  4803.         RETURNS
  4804.  
  4805.           TRUE or NULL if error
  4806.  
  4807.         CAUTIONS and ADDITIONAL NOTES
  4808.  
  4809.           None.
  4810.  
  4811.  
  4812.  
  4813.                                                            Page: 78
  4814.                                                      The Window BOSS
  4815.  
  4816.  
  4817.  
  4818.         10.28. wn_color -- set window & border attribute
  4819.  
  4820.         USAGE
  4821.  
  4822.           wn_color(wn, atrib, batrib)
  4823.           WINDOWPTR wn;
  4824.           unsigned int atrib, batrib;
  4825.  
  4826.                 wn -    window handle
  4827.                 atrib - attribute to be used for the window
  4828.                 batrib- attribute to be used for the border
  4829.  
  4830.           wn_color sets the attribute to be used for all subsequent 
  4831.           operations in the window.  The attribute byte contains the 
  4832.           background specific data in the upper 4 bits and the foreground 
  4833.           specific data in the lower 4 bits.  Color and bit definitions 
  4834.           can be found in winboss.h. You can use a statement of the form:
  4835.  
  4836.                          atrib = (bground << 4 | fground);
  4837.  
  4838.           to set the attribute to the correct format.  
  4839.  
  4840.           Attributes are defined in winboss.h.
  4841.  
  4842.         RETURNS
  4843.  
  4844.           Nothing.
  4845.  
  4846.         CAUTIONS and ADDITIONAL NOTES
  4847.  
  4848.           None.
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.                                                            Page: 79
  4875.                                                      The Window BOSS
  4876.  
  4877.  
  4878.  
  4879.         10.29. wn_wrap -- set/clear line wrap flag
  4880.  
  4881.         USAGE
  4882.  
  4883.           wn_wrap(wn, flag) 
  4884.           WINDOWPTR wn;     
  4885.           int flag;
  4886.  
  4887.                 wn -   window handle
  4888.                 flag - wrap flag (TRUE or FALSE)
  4889.  
  4890.           Sets the line wrap flag for window functions.  If line wrap is 
  4891.           true, output that exceeds the width of a window is 
  4892.           automatically placed on the next line.  When the line wrap flag 
  4893.           is false, output that exceeds the width of the window is lost.  
  4894.  
  4895.         RETURNS
  4896.  
  4897.           Nothing.
  4898.  
  4899.         CAUTIONS and ADDITIONAL NOTES
  4900.  
  4901.           None.
  4902.  
  4903.  
  4904.  
  4905.         10.30. wn_sync -- set/clear cursor synchronization flag
  4906.  
  4907.         USAGE
  4908.  
  4909.           wn_sync(wn, flag) 
  4910.           WINDOWPTR wn;     
  4911.           int flag;
  4912.  
  4913.                 wn -   window handle
  4914.                 flag - synchronization flag (TRUE or FALSE)
  4915.  
  4916.           When wn_sync is called with a value of TRUE all subsequent text 
  4917.           output to the window will have a flashing (normal) cursor 
  4918.           displayed following the last character output. Calling wn_sync 
  4919.           with a value of false inhibits the cursor from physically 
  4920.           advancing (it is always logically advanced).  
  4921.  
  4922.         RETURNS
  4923.  
  4924.           Nothing.
  4925.  
  4926.         CAUTIONS and ADDITIONAL NOTES
  4927.  
  4928.           None.
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.                                                            Page: 80
  4936.                                                      The Window BOSS
  4937.  
  4938.  
  4939.  
  4940.         10.31. wn_scroll -- set scrolling method for window
  4941.  
  4942.         USAGE
  4943.  
  4944.           wn_scroll(wn,method)
  4945.           WINDOWPTR wn;
  4946.           int method;
  4947.  
  4948.                   wn -      window handle.
  4949.                   method -  BIOS or DMAS
  4950.  
  4951.            Set the method to be used to scroll the contents of the window 
  4952.            to use either the ROM BIOS (BIOS), or the flicker free DMA 
  4953.            logic.  BIOS and DMAS are defined in "winboss.h".  
  4954.  
  4955.            The default scrolling mode is DMAS.
  4956.  
  4957.            The Window BOSS incorporates machine independent logic that 
  4958.            ensures that scrolling on color systems is performed in such a 
  4959.            way as to totally eliminate snow and flicker.  This logic, 
  4960.            although bulletproof, can slow scrolling down.  Setting the 
  4961.            scrolling method to BIOS provides a machine independent way to 
  4962.            improve the scrolling speed with a (perhaps) proportional 
  4963.            increase in flicker.  Keep in mind that recent developments in 
  4964.            CGA and EGA technology have, for the most part, eliminated 
  4965.            scrolling flicker at the hardware level.  If your system is 
  4966.            equipped with one of these boards, you may achieve a 
  4967.            noticeable improvement in scrolling speed by using wn_scroll() 
  4968.            to set the scrolling method to BIOS.  Additionally, there are 
  4969.            several console device drivers (FANSI and NANSI to mention 
  4970.            two) that "patch" the BIOS routines to achieve the same 
  4971.            result.  
  4972.  
  4973.            Setting the scrolling method to BIOS when wn_dmaflg=FALSE has 
  4974.            no effect.
  4975.  
  4976.         RETURNS
  4977.  
  4978.            Nothing.
  4979.  
  4980.         CAUTIONS and ADDITIONAL NOTES
  4981.  
  4982.            Color systems only.
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.                                                            Page: 81
  4997.                                                      The Window BOSS
  4998.  
  4999.  
  5000.  
  5001.         10.32. wn_dma -- set/clear write RAM directly flag
  5002.  
  5003.         USAGE
  5004.  
  5005.           wn_dma(flag)      
  5006.           int flag;         
  5007.  
  5008.                 flag - write to video RAM flag (TRUE or FALSE).
  5009.  
  5010.           The windowing routines assume that your video card supports 
  5011.           direct access to the video RAM (normal for monochrome 
  5012.           monitors).  
  5013.  
  5014.         RETURNS
  5015.  
  5016.           Nothing.
  5017.  
  5018.         CAUTIONS and ADDITIONAL NOTES
  5019.  
  5020.           None.
  5021.  
  5022.  
  5023.  
  5024.         10.33. wn_fixcsr -- update window cursor position
  5025.  
  5026.         USAGE
  5027.  
  5028.           wn_fixcsr(wn)     
  5029.           WINDOWPTR wn;     
  5030.  
  5031.                 wn - window handle
  5032.  
  5033.           wn_fixcsr is a companion routine to wn_sync.  Causes the 
  5034.           physical cursor to be placed at the logical cursor location.  
  5035.           It is typically called after wn_sync has been called to disable 
  5036.           cursor synchronization.  wn_fixcsr does not alter the state of 
  5037.           the windows cursor synchronization flag.  
  5038.  
  5039.         RETURNS
  5040.  
  5041.           TRUE or NULL if error
  5042.  
  5043.         CAUTIONS and ADDITIONAL NOTES
  5044.  
  5045.           The window "wn" automatically becomes the top window tile upon 
  5046.           return.
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.                                                            Page: 82
  5058.                                                      The Window BOSS
  5059.  
  5060.  
  5061.  
  5062.         10.34. wn_boxset -- set box drawing character set
  5063.  
  5064.         USAGE
  5065.  
  5066.           wn_boxset(ul, ur, tb, sd, ll, lr);
  5067.           int ul, ur, tb, sd, ll, lr;
  5068.  
  5069.             ul - upper left corner character
  5070.             ur - upper right corner character
  5071.             tb - top/bottom line character
  5072.             sd - left/right side character
  5073.             ll - lower left corner character
  5074.             lr - lower right corner character
  5075.  
  5076.           wn_boxset set the characters to be used to frame all future 
  5077.           windows.
  5078.  
  5079.         RETURNS
  5080.  
  5081.           Nothing.
  5082.  
  5083.         CAUTIONS and ADDITIONAL NOTES
  5084.  
  5085.           None.
  5086.  
  5087.  
  5088.  
  5089.         10.35. wn_natrib -- set new attribute in window NOW!
  5090.  
  5091.         USAGE
  5092.  
  5093.           wn_natrib(wn,atrib)
  5094.           WINDOWPTR wn;
  5095.           int atrib;
  5096.  
  5097.             wn    - window handle
  5098.             atrib - attribute to set the window specified by wn to.  
  5099.  
  5100.           The attributes of the window are changed immediately.
  5101.  
  5102.           Attributes are defined in window.h
  5103.  
  5104.           The border is not altered.
  5105.  
  5106.         RETURNS
  5107.  
  5108.           TRUE or NULL if error
  5109.  
  5110.         CAUTIONS and ADDITIONAL NOTES
  5111.  
  5112.           The window "wn" automatically becomes the top window tile upon 
  5113.           return.
  5114.  
  5115.  
  5116.  
  5117.  
  5118.                                                            Page: 83
  5119.                                                      The Window BOSS
  5120.  
  5121.  
  5122.  
  5123.         10.36. wn_dborder -- draw (replace) border on window
  5124.  
  5125.         USAGE
  5126.  
  5127.           wn_dborder(wn, ul, ur, tb, sd, ll, lr);
  5128.           WINDOWPTR wn;
  5129.           int ul, ur, tb, sd, ll, lr;
  5130.  
  5131.             wn - window handle
  5132.             ul - upper left corner character
  5133.             ur - upper right corner character
  5134.             tb - top/bottom line character
  5135.             sd - left/right side character
  5136.             ll - lower left corner character
  5137.             lr - lower right corner character
  5138.  
  5139.           The currently defined border attribute is used when drawing the 
  5140.           border.
  5141.  
  5142.         RETURNS
  5143.  
  5144.           TRUE or NULL if error
  5145.  
  5146.         CAUTIONS and ADDITIONAL NOTES
  5147.  
  5148.           The window "wn" automatically becomes the top window tile upon 
  5149.           return.
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.                                                            Page: 84
  5180.                                                      The Window BOSS
  5181.  
  5182.  
  5183.  
  5184.         10.37. wn_input -- general purpose window input
  5185.  
  5186.         USAGE
  5187.  
  5188.           wn_input(wn, row, col, prmpt, mask, fill, atrib, ubuff,hlpmsg)
  5189.           
  5190.              (WINDOWPTR) wn  - window pointer
  5191.              int        row  - row in window where prompt is displayed
  5192.              int        col  - col in window where prompt is displayed
  5193.              char *    prmpt - field prompt 
  5194.              char *    mask  - data entry mask
  5195.              char      fill  - fill character
  5196.              unsigned  atrib - attributes to be used 
  5197.                                (fground<<4 | background)
  5198.              char *    ubuff - user text buffer of MAXSTR size
  5199.              char *    hlpmsg- user help message - displayed
  5200.                                when HELP is pressed.  F1 is the default 
  5201.                                HELP key.  This can be changed by calling 
  5202.                                the wn_shkey() function.
  5203.             
  5204.              wn_input is the Data Clerk's kernel. It is called by  
  5205.              virtually all the higher level data entry functions.
  5206.           
  5207.         RETURNS:
  5208.           
  5209.              NULL if error, else non zero value (ASCII value of last 
  5210.              valid exit key).
  5211.  
  5212.              Sets the global "wns_escape" to TRUE if the ESCape key was 
  5213.              pressed causing wn_input to terminate. Set to FALSE 
  5214.              otherwise.
  5215.           
  5216.         CAUTIONS and ADDITIONAL NOTES:
  5217.           
  5218.              prmpt - If a prompt message is not to be provided, wn_input 
  5219.                      should be called with NSTR (null string) in  the 
  5220.                      place of the prompt message text pointer, for 
  5221.                      example:
  5222.           
  5223.                       wn_input(wn,row,col,NSTR,mask,fill,atrib,ubuff,hlpmsg)
  5224.                                           +--+
  5225.                      #defined in winboss.h --^
  5226.           
  5227.                      The prompt is displayed with the current window 
  5228.                      attributes at the row and column specified in the 
  5229.                      call. Data entry begins immediately after the 
  5230.                      prompt.
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.                                                            Page: 85
  5241.                                                      The Window BOSS
  5242.  
  5243.  
  5244.  
  5245.         wn_input -- continued.
  5246.  
  5247.  
  5248.  
  5249.              mask -  The mask determines what type of data may be entered 
  5250.                      on a character by character basis.  The control 
  5251.                      characters are as follows:
  5252.           
  5253.                       # - Number (0 thru 9, -, +)
  5254.                       a - Any ASCII character 
  5255.                           (0x01 thru 0xff excluding 0x08)
  5256.                       x - Same as 'a', but without echo (password)
  5257.                       t - Any printable ASCII char (' ' thru '~')
  5258.                       l - lower case character (a thru z)
  5259.                       u - upper case character (A thru Z)
  5260.                       Mask Examples:
  5261.           
  5262.                        Date Mask           "##/##/##"
  5263.                        Time Mask           "##:##:##"
  5264.                        Integer Mask        "#######"
  5265.                        Float Mask          "FFFF.FF"
  5266.                        Phone Number        "(###) ###-####"
  5267.                        Upper Case Mask     "uuuuu" or "UUUUU"
  5268.                        Lower Case Mask     "lllll" or "LLLLL"
  5269.                        ASCII Mask          "aaaaa" or "AAAAA"
  5270.                        No Echo ASCII       "xxxxx" or "XXXXX"
  5271.                        Text Mask           "ttttt" or "TTTTT"
  5272.           
  5273.              fill -  The character to be used to fill the field where 
  5274.                      mask characters appear.  The typical choice for fill 
  5275.                      char is '_'.
  5276.           
  5277.              help  - If a HELP message is not to be provided, wn_input 
  5278.                      should be called with NSTR (null string) in the 
  5279.                      place of the help message text pointer, for example:
  5280.           
  5281.                       wn_input(wn,row,col,NSTR,mask,fill,atrib,ubuff,NSTR)
  5282.                                                                      +--+
  5283.                                                #defined in winboss.h --^
  5284.                     
  5285.                      wn_ihmsg is called to display this message whenever 
  5286.                      the HELP key is depressed while the cursor is in the 
  5287.                      field.  F1 is the default HELP key.  This can be 
  5288.                      changed by calling the wn_shkey() function.
  5289.           
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.                                                            Page: 86
  5302.                                                      The Window BOSS
  5303.  
  5304.  
  5305.  
  5306.         wn_input -- continued.
  5307.  
  5308.  
  5309.  
  5310.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5311.                      the data as it is entered.  Typical size is the 
  5312.                      length of the mask + 2 bytes (strlen(mask)+2). 
  5313.                      Maximum length is MAXSTR.
  5314.           
  5315.                      On entry the first byte of ubuff should be a null, 
  5316.                      otherwise wn_input assumes there is valid data there 
  5317.                      and will enter edit mode.  This can be handy if 
  5318.                      there is a need for prefilled, but editable fields.  
  5319.                      In actual practice, wn_input uses this buffer for 
  5320.                      both initial character data entry and subsequent 
  5321.                      editing.
  5322.           
  5323.                      On return, ubuff contains the actual data entered in 
  5324.                      character format with fill and mask characters as 
  5325.                      spaces (e.g. "Now is the time          "). 
  5326.  
  5327.                      ubuff is returned left justified for non numeric 
  5328.                      masks.  If a completely numeric mask (#) was 
  5329.                      specified and the mask does not contain any other 
  5330.                      characters, ubuff is returned right justified.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.                                                            Page: 87
  5363.                                                      The Window BOSS
  5364.  
  5365.  
  5366.  
  5367.         wn_input -- continued.
  5368.  
  5369.  
  5370.  
  5371.              Editing Keys
  5372.  
  5373.                      Pressing the ESCape, RETURN/ENTER, UARROW, or DARROW 
  5374.                      key terminates input.  Since wn_input can be called 
  5375.                      alone, or from any of the custom data entry routines 
  5376.                      wn_gint, (wn_gfloat via wn_frmget), etc., wn_input 
  5377.                      must be able to exit in a variety of ways. If 
  5378.                      wn_input has been called as the result of a call to 
  5379.                      wn_frmget, the UARROW and DARROW keys move to the 
  5380.                      previous and next fields respectively.  The global 
  5381.                      wns_escape is set to TRUE if the ESCape key caused 
  5382.                      wn_input to terminate (set to FALSE otherwise).
  5383.  
  5384.                      Backspace and the cursor RIGHT ARROW and LEFT ARROW 
  5385.                      can be used to move the cursor one position at a 
  5386.                      time during entry. Control+RIGHT ARROW and 
  5387.                      Control+LEFT ARROW move the cursor to the 
  5388.                      previous/next word. The space bar can also be 
  5389.                      pressed when entering numeric fields provided that 
  5390.                      no "digits", "+", or "-" has been struck. Naturally, 
  5391.                      the HOME and END key work in a predictable fashion 
  5392.                      as do the INSert and DELete keys. The HOME key 
  5393.                      positions the cursor at the start of the field, END 
  5394.                      to end of the field.  The INSert key inserts a space 
  5395.                      at the current cursor position (pushing the contents 
  5396.                      of the field to the right.  DELete deletes the 
  5397.                      character at the cursor location (dragging the 
  5398.                      contents of the field to the left).
  5399.           
  5400.                      When the field fills and RETURN/ENTER has not been 
  5401.                      struck, the cursor waits at the end of the field for 
  5402.                      RETURN/ENTER to be pressed.  You may also press 
  5403.                      Backspace, HOME, or LEFT ARROW - these allow the 
  5404.                      field to be edited again.
  5405.  
  5406.                      The cursor shape indicates whether or not data can 
  5407.                      be entered, or if you are beyond the fields edge.  
  5408.                      The cursor is half size (bottom half) when data can 
  5409.                      be entered, and half size (top half) when you are 
  5410.                      beyond the edge of the field.
  5411.           
  5412.                      BELLs automatically ring when you strike an invalid 
  5413.                      key or attempt to enter data beyond the edge of the 
  5414.                      field.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.                                                            Page: 88
  5424.                                                      The Window BOSS
  5425.  
  5426.  
  5427.  
  5428.         wn_input -- continued.
  5429.  
  5430.  
  5431.  
  5432.              Miscellaneous
  5433.           
  5434.                      Choose your fill character wisely, as you can not 
  5435.                      enter that character as data in a field.  
  5436.           
  5437.                      The data entry routines are pointer intensive. 
  5438.                      Failure to insure that they are called with 
  5439.                      arguments of the right type, size, and dimension 
  5440.                      will certainly cause undesired results.
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.                                                            Page: 89
  5485.                                                      The Window BOSS
  5486.  
  5487.  
  5488.  
  5489.         10.38. wn_frmopn -- open data entry form
  5490.  
  5491.         USAGE
  5492.  
  5493.           wn_frmopn(nfields)
  5494.           
  5495.              int     nfields - number of fields in form plus 1.
  5496.  
  5497.         RETURNS:
  5498.           
  5499.              Pointer to an array of field control blocks. (WIFORM)
  5500.           
  5501.                 or
  5502.           
  5503.              NULL if error (memory could not be allocated)
  5504.           
  5505.         CAUTIONS and ADDITIONAL NOTES:
  5506.           
  5507.              If wn_frmopn returns NULL, no attempt should be made to use 
  5508.              the data entry form in question.  NULL indicates that memory 
  5509.              could not be allocated for the form!
  5510.               
  5511.              This routine must be called before  wn_frmget and wn_frmcls.
  5512.  
  5513.              If your form contains 4 fields the call wn_frmopn as 
  5514.              follows:
  5515.  
  5516.                 WIFORM frm;
  5517.                   
  5518.                   frm = wn_frmopn(5);
  5519.  
  5520.              Fields are sequentially numbered starting from 0 ending at 
  5521.              nfields-2.  The extra field is used for internal purposes.
  5522.  
  5523.              Refer to "SAMPLE.C" for example(s) of usage.
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.                                                            Page: 90
  5546.                                                      The Window BOSS
  5547.  
  5548.  
  5549.  
  5550.         10.39. wn_frmget -- get (read) data entry form
  5551.  
  5552.         USAGE
  5553.  
  5554.           wn_frmget(frm)
  5555.           
  5556.              WIFORM   frm - valid field pointer.
  5557.           
  5558.         RETURNS:
  5559.           
  5560.              TRUE  - indicating all fields of the form in question have 
  5561.                      been fetched and verified (where required).
  5562.  
  5563.              ESC_CODE - indicating ESCape was pressed and form processing
  5564.                      was terminated.
  5565.           
  5566.                 or
  5567.           
  5568.              Never Returns!!
  5569.           
  5570.         CAUTIONS and ADDITIONAL NOTES:
  5571.           
  5572.              As provided, wn_frmget is very usable, however, you may wish 
  5573.              to modify it (source has been provided for this purpose) to 
  5574.              include some of your own custom forms or the way in which 
  5575.              forms are processed when completed. 
  5576.  
  5577.              As distributed, wn_frmget first displays all field prompts 
  5578.              and then positions to the first field, performs data entry 
  5579.              on a field by field basis from the first to the last 
  5580.              (allowing editing along the way), asks for a confirmation to 
  5581.              accept the fields on the form after the last field is 
  5582.              entered, either accepts the form, or drops into edit mode 
  5583.              for all the fields on the form starting at the first field.
  5584.  
  5585.              Refer to wn_input for a discussion of editing keys during 
  5586.              data entry.
  5587.           
  5588.              wn_frmget will not return unless ESCape is pressed or  all 
  5589.              data has been entered and verified (where required).
  5590.               
  5591.              This routine must be called after wn_frmopn, and before 
  5592.              wn_frmcls.
  5593.  
  5594.              Refer to "SAMPLE.C" for example(s) of usage.
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.                                                            Page: 91
  5607.                                                      The Window BOSS
  5608.  
  5609.  
  5610.  
  5611.         10.40. wn_frmcls -- close data entry form
  5612.  
  5613.         USAGE
  5614.  
  5615.              wn_frmcls(frm)
  5616.           
  5617.              (WIFORM) frm - pointer to an array of field control blocks
  5618.           
  5619.         RETURNS:
  5620.           
  5621.              TRUE 
  5622.           
  5623.         CAUTIONS and ADDITIONAL NOTES:
  5624.           
  5625.              This routine should only be called if memory is scarce or 
  5626.              there is no further need for the form you wish to close.  
  5627.              Once a form is closed, all traces of it vanish, the only way 
  5628.              to get it back is to start from scratch with wn_frmopn, 
  5629.              wn_frmget and so on.
  5630.  
  5631.              Closing a form has no impact on its visual image, just its 
  5632.              logical existence. If you wish to make a form vanish both 
  5633.              logically and visually - close the window it is anchored to 
  5634.              after, and only after, closing the form.
  5635.  
  5636.              In this release, a form is not automatically closed when the 
  5637.              window to which it is anchored is closed.  
  5638.  
  5639.              Refer to "SAMPLE.C" for example(s) of usage.
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.                                                            Page: 92
  5668.                                                      The Window BOSS
  5669.  
  5670.  
  5671.  
  5672.         10.41. wn_gdate - input date in window (MM/DD/YY)
  5673.  
  5674.         USAGE
  5675.  
  5676.           wn_gdate(fun,frm,fld,wn,row,col,prmpt,atrib,fill,month,day,year,
  5677.                    ubuff,hlpmsg,errmsg)
  5678.           
  5679.              int        fun - function code (SET || XEQ)
  5680.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5681.              int        fld - field # in form (actual || NULL)
  5682.              (WINDOWPTR) wn - window pointer
  5683.              int        row - row in window where data input begins
  5684.              int        col - col in window where data input begins
  5685.              (char *) prmpt - field prompt (call with NSTR for none)
  5686.              unsigned atrib - field (not prompt) attributes 
  5687.              char      fill - field fill character
  5688.              (int *)  month - pointer to int for month (1-12)
  5689.              (int *)    day - pointer to int for day (1-31)
  5690.              (int *)   year - pointer to int for year (0-99)
  5691.              (char *) ubuff - pointer to char array of 10 bytes 
  5692.              (char *)hlpmsg - pointer to help message 
  5693.                               (call with NSTR for none)
  5694.              (char *)errmsg - pointer to err message
  5695.                               (call with NSTR for none)
  5696.           
  5697.         RETURNS:
  5698.           
  5699.              month, day, and year via pointers.
  5700.           
  5701.              NULL if error, else the non zero value returned from 
  5702.              wn_input.
  5703.  
  5704.              "wns_escape" is set to TRUE if the ESCape key caused 
  5705.              wn_input to terminate.  Set to FALSE otherwise.
  5706.           
  5707.         CAUTIONS and ADDITIONAL NOTES:
  5708.           
  5709.              fun - fun can only be SET for form setup, or XEQ for 
  5710.                    immediate execution.  When called with SET, valid 
  5711.                    arguments for both "frm" and "fld" must be specified.  
  5712.                    frm is the field pointer returned from wn_frmopn(), and 
  5713.                    fld is the field sequence number in the form for this 
  5714.                    field.  When called with XEQ frm must be NFRM and fld 
  5715.                    must be NFLD.
  5716.           
  5717.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  5718.                    the data as it is entered.  Minimum size is 10.
  5719.           
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.                                                            Page: 93
  5729.                                                      The Window BOSS
  5730.  
  5731.  
  5732.  
  5733.         wn_gdate continued.
  5734.  
  5735.  
  5736.  
  5737.                    On entry, the first byte of ubuff should be a null, 
  5738.                    otherwise wn_input assumes there is valid data there 
  5739.                    and will enter edit mode.  This can be handy if there 
  5740.                    is a need for prefilled, but editable fields.  In 
  5741.                    actual practice, wn_input uses this buffer for both 
  5742.                    initial character data entry and subsequent editing.
  5743.  
  5744.                    On return, ubuff contains the actual data entered in 
  5745.                    character format with fill and mask characters as 
  5746.                    spaces (e.g. "12 12 88").
  5747.  
  5748.              Only basic reasonability checks are made.  Therefore, dates 
  5749.              like 02/31/88 can be returned.
  5750.           
  5751.              Calls wn_input to perform data entry.
  5752.           
  5753.              Data must satisfy validation checks for function to return.
  5754.  
  5755.              Refer to "SAMPLE.C" for example(s) of usage.
  5756.  
  5757.  
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.                                                            Page: 94
  5790.                                                      The Window BOSS
  5791.  
  5792.  
  5793.  
  5794.         10.42. wn_gedate - input European date in window (DD/MM/YY)
  5795.  
  5796.         USAGE
  5797.  
  5798.           wn_gedate(fun,frm,fld,wn,row,col,prmpt,atrib,fill,day,month,year,
  5799.                    ubuff,hlpmsg,errmsg)
  5800.           
  5801.              int        fun - function code (SET || XEQ)
  5802.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5803.              int        fld - field # in form (actual || NULL)
  5804.              (WINDOWPTR) wn - window pointer
  5805.              int        row - row in window where data input begins
  5806.              int        col - col in window where data input begins
  5807.              (char *) prmpt - field prompt (call with NSTR for none)
  5808.              unsigned atrib - field (not prompt) attributes 
  5809.              char      fill - field fill character
  5810.              (int *)    day - pointer to int for day (1-31)
  5811.              (int *)  month - pointer to int for month (1-12)
  5812.              (int *)   year - pointer to int for year (0-99)
  5813.              (char *) ubuff - pointer to char array of 10 bytes 
  5814.              (char *)hlpmsg - pointer to help message 
  5815.                               (call with NSTR for none)
  5816.              (char *)errmsg - pointer to err message
  5817.                               (call with NSTR for none)
  5818.           
  5819.         RETURNS:
  5820.           
  5821.              day, month, and year via pointers.
  5822.           
  5823.              NULL if error, else the non zero value returned from 
  5824.              wn_input.
  5825.  
  5826.              "wns_escape" is set to TRUE if the ESCape key caused 
  5827.              wn_input to terminate.  Set to FALSE otherwise.
  5828.           
  5829.         CAUTIONS and ADDITIONAL NOTES:
  5830.           
  5831.              fun - fun can only be SET for form setup, or XEQ for 
  5832.                    immediate execution.  When called with SET, valid 
  5833.                    arguments for both "frm" and "fld" must be specified.  
  5834.                    frm is the field pointer returned from wn_frmopn(), and 
  5835.                    fld is the field sequence number in the form for this 
  5836.                    field.  When called with XEQ frm must be NFRM and fld 
  5837.                    must be NFLD.
  5838.           
  5839.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  5840.                    the data as it is entered.  Minimum size is 10.
  5841.           
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.                                                            Page: 95
  5851.                                                      The Window BOSS
  5852.  
  5853.  
  5854.  
  5855.         wn_gedate continued.
  5856.  
  5857.  
  5858.  
  5859.                    On entry, the first byte of ubuff should be a null, 
  5860.                    otherwise wn_input assumes there is valid data there 
  5861.                    and will enter edit mode.  This can be handy if there 
  5862.                    is a need for prefilled, but editable fields.  In 
  5863.                    actual practice, wn_input uses this buffer for both 
  5864.                    initial character data entry and subsequent editing.
  5865.  
  5866.                    On return, ubuff contains the actual data entered in 
  5867.                    character format with fill and mask characters as 
  5868.                    spaces (e.g. "29 02 88").
  5869.  
  5870.              Only basic reasonability checks are made.  Therefore, dates 
  5871.              like 30/02/88 can be returned.
  5872.           
  5873.              Calls wn_input to perform data entry.
  5874.           
  5875.              Data must satisfy validation checks for function to return.
  5876.  
  5877.              Refer to "SAMPLE.C" for example(s) of usage.
  5878.  
  5879.  
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.  
  5898.  
  5899.  
  5900.  
  5901.  
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.                                                            Page: 96
  5912.                                                      The Window BOSS
  5913.  
  5914.  
  5915.  
  5916.         10.43. wn_gtime -- input time in window
  5917.  
  5918.         USAGE
  5919.  
  5920.           wn_gtime(fun,frm,fld,wn,row,col,prmpt,atrib,fill,hrs,mins,
  5921.                    secs,ubuff,hlpmsg,errmsg)
  5922.           
  5923.              int        fun - function code (SET || XEQ)
  5924.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5925.              int        fld - field # in form (actual || NFLD)
  5926.              (WINDOWPTR) wn - window pointer
  5927.              int        row - row in window where data input begins
  5928.              int        col - col in window where data input begins
  5929.              (char *) prmpt - field prompt (call with NSTR for none)
  5930.              unsigned atrib - field (not prompt) attributes 
  5931.              char      fill - field fill character
  5932.              (int *)    hrs - pointer to int for hours (0-24)
  5933.              (int *)   mins - pointer to int for minutes (0-59)
  5934.              (int *)   secs - pointer to int for seconds (0-59)
  5935.              (char *) ubuff - pointer to char array of 10 bytes 
  5936.              (char *)hlpmsg - pointer to help message 
  5937.                               (call with NSTR for none)
  5938.              (char *)errmsg - pointer to err message 
  5939.                               (call with NSTR for none)
  5940.           
  5941.         RETURNS:
  5942.           
  5943.              hrs, mins, and secs via pointers.
  5944.           
  5945.              NULL if error, else the non zero value returned from  
  5946.              wn_input.
  5947.           
  5948.              "wns_escape" is set to TRUE if the ESCape key caused 
  5949.              wn_input to terminate.  Set to FALSE otherwise.
  5950.  
  5951.         CAUTIONS and ADDITIONAL NOTES:
  5952.           
  5953.              fun - fun can only be SET for form setup, or XEQ for 
  5954.                    immediate execution.  When called with SET, valid 
  5955.                    arguments for both "frm" and "fld" must be specified.  
  5956.                    frm is the field pointer returned from wn_frmopn(), and 
  5957.                    fld is the field sequence number in the form for this 
  5958.                    field.  When called with XEQ frm must be NFRM and fld 
  5959.                    must be NFLD.
  5960.           
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.                                                            Page: 97
  5973.                                                      The Window BOSS
  5974.  
  5975.  
  5976.  
  5977.         wn_gtime - continued.
  5978.  
  5979.  
  5980.              
  5981.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5982.                    the data as it is entered.  Minimum size is 10.
  5983.           
  5984.                    On entry, the first byte of ubuff should be a null, 
  5985.                    otherwise wn_input assumes there is valid data there 
  5986.                    and will enter edit mode.  This can be handy if there 
  5987.                    is a need for prefilled, but editable fields.  In 
  5988.                    actual practice, wn_input uses this buffer for both 
  5989.                    initial character data entry and subsequent editing.
  5990.  
  5991.                     On return, ubuff contains the actual data entered in 
  5992.                     character format with fill and mask characters as 
  5993.                     spaces (e.g. "23 59 22").
  5994.           
  5995.              Only basic reasonability checks are made.  Therefore, times 
  5996.              like 24:59:59 can be returned.
  5997.           
  5998.              Calls wn_input to perform data entry.
  5999.           
  6000.              Data must satisfy validation checks for function to return.
  6001.  
  6002.              Refer to "SAMPLE.C" for example(s) of usage.
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.                                                            Page: 98
  6034.                                                      The Window BOSS
  6035.  
  6036.  
  6037.  
  6038.         10.44. wn_gphone -- input phone number in window
  6039.  
  6040.         USAGE
  6041.  
  6042.           wn_gphone(fun,frm,fld,wn,row,col,prmpt,atrib,fill,acode,
  6043.                     nnx,num,ubuff,hlpmsg,errmsg)
  6044.           
  6045.              int        fun - function code (SET || XEQ)
  6046.              (WIFORM)   frm - form pointer  (actual || NFRM)
  6047.              int        fld - field # in form (actual || NFLD)
  6048.              (WINDOWPTR) wn - window pointer
  6049.              int        row - row in window where data input begins
  6050.              int        col - col in window where data input begins
  6051.              (char *) prmpt - field prompt (call with NSTR for none)
  6052.              unsigned atrib - field (not prompt) attributes 
  6053.              char      fill - field fill character
  6054.              (int *)  acode - pointer to int for area code (3 digits)
  6055.              (int *)    nnx - pointer to int for nnx (3 digits)
  6056.              (int *)    num - pointer to int for number (4 digits)
  6057.              (char *) ubuff - pointer to char array of 18 bytes 
  6058.              (char *)hlpmsg - pointer to help message 
  6059.                               (call with NSTR for none)
  6060.              (char *)errmsg - pointer to err message 
  6061.                               (call with NSTR for none)
  6062.           
  6063.         RETURNS:
  6064.           
  6065.              acode, nnx, and num via pointers.
  6066.           
  6067.              NULL if error, else the non zero value returned from 
  6068.              wn_input.
  6069.                
  6070.              "wns_escape" is set to TRUE if the ESCape key caused 
  6071.              wn_input to terminate.  Set to FALSE otherwise.
  6072.  
  6073.         CAUTIONS and ADDITIONAL NOTES:
  6074.           
  6075.              fun - fun can only be SET for form setup, or XEQ for 
  6076.                    immediate execution.  When called with SET, valid 
  6077.                    arguments for both "frm" and "fld" must be specified.  
  6078.                    frm is the field pointer returned from wn_frmopn(), and 
  6079.                    fld is the field sequence number in the form for this 
  6080.                    field.  When called with XEQ frm must be NFRM and fld 
  6081.                    must be NFLD.
  6082.           
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.                                                            Page: 99
  6095.                                                      The Window BOSS
  6096.  
  6097.  
  6098.  
  6099.         wn_gphone - continued.  
  6100.  
  6101.  
  6102.  
  6103.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  6104.                    the data as it is entered.  Minimum size is 18 bytes.
  6105.           
  6106.                    On entry, the first byte of ubuff should be a null, 
  6107.                    otherwise wn_input assumes there is valid data there 
  6108.                    and will enter edit mode.  This can be handy if there 
  6109.                    is a need for prefilled, but editable fields.  In 
  6110.                    actual practice, wn_input uses this buffer for both 
  6111.                    initial character data entry and subsequent editing.
  6112.  
  6113.                    On return, ubuff contains the actual data entered in 
  6114.                    character format with fill and mask characters as 
  6115.                    spaces (e.g. 800 555 1212).
  6116.           
  6117.             No validation is performed.
  6118.           
  6119.             Leaving the field blank returns 0 for ACODE, NNX, and NUM.
  6120.           
  6121.             Calls wn_input to perform data entry.
  6122.  
  6123.             Refer to "SAMPLE.C" for example(s) of usage.
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.                                                            Page: 100
  6156.                                                      The Window BOSS
  6157.  
  6158.  
  6159.  
  6160.         10.45. wn_gssn -- input social security number in window
  6161.  
  6162.         USAGE
  6163.  
  6164.           wn_gssn(fun,frm,fld,wn,row,col,prmpt,atrib,fill,n1,
  6165.                     n2,n3,ubuff,hlpmsg,errmsg)
  6166.           
  6167.              int        fun - function code (SET || XEQ)
  6168.              (WIFORM)   frm - form pointer  (actual || NFRM)
  6169.              int        fld - field # in form (actual || NFLD)
  6170.              (WINDOWPTR) wn - window pointer
  6171.              int        row - row in window where data input begins
  6172.              int        col - col in window where data input begins
  6173.              (char *) prmpt - field prompt (call with NSTR for none)
  6174.              unsigned atrib - field (not prompt) attributes 
  6175.              char      fill - field fill character
  6176.              (int *)     n1 - pointer to int for 1st part of ssn     
  6177.              (int *)     n2 - pointer to int for 2nd part of ssn
  6178.              (int *)     n3 - pointer to int for 3rd part of ssn  
  6179.              (char *) ubuff - pointer to char array of 13 bytes 
  6180.              (char *)hlpmsg - pointer to help message 
  6181.                               (call with NSTR for none)
  6182.              (char *)errmsg - pointer to err message 
  6183.                               (call with NSTR for none)
  6184.           
  6185.         RETURNS:
  6186.           
  6187.              Social security number in three parts: n1,n2,n3 via pointers.
  6188.           
  6189.              NULL if error, else the non zero value returned from 
  6190.              wn_input.
  6191.                
  6192.              "wns_escape" is set to TRUE if the ESCape key caused 
  6193.              wn_input to terminate.  Set to FALSE otherwise.
  6194.  
  6195.         CAUTIONS and ADDITIONAL NOTES:
  6196.           
  6197.              fun - fun can only be SET for form setup, or XEQ for 
  6198.                    immediate execution.  When called with SET, valid 
  6199.                    arguments for both "frm" and "fld" must be specified.  
  6200.                    frm is the field pointer returned from wn_frmopn(), and 
  6201.                    fld is the field sequence number in the form for this 
  6202.                    field.  When called with XEQ frm must be NFRM and fld 
  6203.                    must be NFLD.
  6204.           
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.                                                            Page: 101
  6217.                                                      The Window BOSS
  6218.  
  6219.  
  6220.  
  6221.         wn_gssn - continued.  
  6222.  
  6223.                      
  6224.  
  6225.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  6226.                    the data as it is entered.  Minimum size is 13 bytes.
  6227.           
  6228.                    On entry, the first byte of ubuff should be a null, 
  6229.                    otherwise wn_input assumes there is valid data there 
  6230.                    and will enter edit mode.  This can be handy if there 
  6231.                    is a need for prefilled, but editable fields.  In 
  6232.                    actual practice, wn_input uses this buffer for both 
  6233.                    initial character data entry and subsequent editing.
  6234.  
  6235.                    On return, ubuff contains the actual data entered in 
  6236.                    character format with fill and mask characters as 
  6237.                    spaces (e.g. 045 12 8971).
  6238.           
  6239.             No validation is performed.
  6240.           
  6241.             Leaving the field blank returns 0 for N1, N2, and N3
  6242.  
  6243.             Calls wn_input to perform data entry.
  6244.  
  6245.             Refer to "SAMPLE.C" for example(s) of usage.
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.                                                            Page: 102
  6278.                                                      The Window BOSS
  6279.  
  6280.  
  6281.  
  6282.         10.46. wn_gtext -- input text in window
  6283.         10.47. wn_gutext -- input upper case text in window
  6284.         10.48. wn_gltext -- input lower case text in window
  6285.         10.49. wn_gatext -- input text & graphics characters  
  6286.  
  6287.         USAGE
  6288.  
  6289.           wn_gtext(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  6290.                    ubuff,hlpmsg,errmsg)
  6291.           wn_gutext(..same as wn_gtext)
  6292.           wn_gltext(..same as wn_gtext)
  6293.           wn_gatext(..same as wn_gtext)
  6294.  
  6295.              int        fun - function code (SET || XEQ)
  6296.              (WIFORM)   frm - form pointer  (actual || NFRM)
  6297.              int        fld - field # in form (actual || NFLD)
  6298.              (WINDOWPTR) wn - window pointer
  6299.              int        row - row in window where data input begins
  6300.              int        col - col in window where data input begins
  6301.              (char *) prmpt - field prompt (call with NSTR for none)
  6302.              unsigned atrib - field (not prompt) attributes 
  6303.              char      fill - field fill character
  6304.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  6305.              (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6306.              (char *)hlpmsg - pointer to help message 
  6307.                               (call with NSTR for none)
  6308.              (char *)errmsg - pointer to err message 
  6309.                               (call with NSTR for none)
  6310.           
  6311.         RETURNS:
  6312.           
  6313.              ubuff with text data via pointer.
  6314.           
  6315.              NULL if error, else the non zero value returned from 
  6316.              wn_input.
  6317.           
  6318.              "wns_escape" is set to TRUE if the ESCape key caused 
  6319.              wn_input to terminate.  Set to FALSE otherwise.
  6320.  
  6321.         CAUTIONS and ADDITIONAL NOTES:
  6322.  
  6323.              wn_gatext - wn_gatext allows graphics characters to be input.  It 
  6324.                    is otherwise identical to wn_gtext.
  6325.              
  6326.              fun - fun can only be SET for form setup, or XEQ for 
  6327.                    immediate execution.  When called with SET, valid 
  6328.                    arguments for both "frm" and "fld" must be specified.  
  6329.                    frm is the field pointer returned from wn_frmopn(), and 
  6330.                    fld is the field sequence number in the form for this 
  6331.                    field.  When called with XEQ frm must be NFRM and fld 
  6332.                    must be NFLD.
  6333.           
  6334.  
  6335.  
  6336.  
  6337.  
  6338.                                                            Page: 103
  6339.                                                      The Window BOSS
  6340.  
  6341.  
  6342.  
  6343.         wn_gtext - continued.
  6344.  
  6345.  
  6346.  
  6347.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  6348.                     the data as it is entered.  Minimum size is fwidth+2.
  6349.           
  6350.                     On entry, the first byte of ubuff should be a null, 
  6351.                     otherwise wn_input assumes there is valid data there 
  6352.                     and will enter edit mode.  This can be handy if there 
  6353.                     is a need for prefilled, but editable fields.  In 
  6354.                     actual practice, wn_input uses this buffer for both 
  6355.                     initial character data entry and subsequent editing.
  6356.  
  6357.                     On return, ubuff contains the actual data entered in 
  6358.                     character format with fill and mask characters as 
  6359.                     spaces (e.g. "This is a line of text ").
  6360.  
  6361.                     Case conversion is automatically performed when 
  6362.                     wn_gutext() or wn_gltext() are called.
  6363.           
  6364.             Calls wn_input to perform data entry.
  6365.           
  6366.             No validation is performed.
  6367.  
  6368.             Parameters are not range checked.  
  6369.  
  6370.             Refer to "SAMPLE.C" for example(s) of usage.
  6371.  
  6372.  
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379.  
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.                                                            Page: 104
  6400.                                                      The Window BOSS
  6401.  
  6402.  
  6403.  
  6404.         10.50. wn_gmltext -- input multi-line text in window
  6405.  
  6406.         USAGE
  6407.  
  6408.           wn_gmltext(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  6409.                    nl,ubuff,hlpmsg,errmsg)
  6410.  
  6411.              int        fun - function code (SET || XEQ)
  6412.              (WIFORM)   frm - form pointer  (actual || NFRM)
  6413.              int        fld - field # in form (actual || NFLD)
  6414.              (WINDOWPTR) wn - window pointer
  6415.              int        row - row in window where data input begins
  6416.              int        col - col in window where data input begins
  6417.              (char *) prmpt - field prompt (call with NSTR for none)
  6418.              unsigned atrib - field (not prompt) attributes 
  6419.              char      fill - field fill character
  6420.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  6421.              int         nl - number of lines (height)
  6422.              (char **)ubuff - array of pointers to char arrays of fwidth+2 bytes 
  6423.              (char *)hlpmsg - pointer to help message 
  6424.                               (call with NSTR for none)
  6425.              (char *)errmsg - pointer to err message 
  6426.                               (call with NSTR for none)
  6427.           
  6428.         RETURNS:
  6429.           
  6430.              text in buffers pointed to by *ubuff[...].
  6431.           
  6432.              NULL if error, else the non zero value returned from 
  6433.              wn_input.
  6434.           
  6435.              "wns_escape" is set to TRUE if the ESCape key caused 
  6436.              wn_input to terminate.  Set to FALSE otherwise.
  6437.  
  6438.         CAUTIONS and ADDITIONAL NOTES:
  6439.  
  6440.              fun - fun can only be SET for form setup, or XEQ for 
  6441.                    immediate execution.  When called with SET, valid 
  6442.                    arguments for both "frm" and "fld" must be specified.  
  6443.                    frm is the field pointer returned from wn_frmopn(), and 
  6444.                    fld is the field sequence number in the form for this 
  6445.                    field.  When called with XEQ frm must be NFRM and fld 
  6446.                    must be NFLD.
  6447.           
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.                                                            Page: 105
  6461.                                                      The Window BOSS
  6462.  
  6463.  
  6464.  
  6465.         wn_gmltext - continued.
  6466.  
  6467.  
  6468.  
  6469.              ubuff - THIS IS AN ARRAY OF POINTERS!! EACH ELEMENT OF UBUFF 
  6470.                     IS A POINTER TO AN ARRAY OF CHARACTERS THAT ARE USED 
  6471.                     AS THE LINE BUFFERS FOR EACH LINE OF THE MULTI-LINE 
  6472.                     TEXT FIELD.  Each line buffer must be of sufficient 
  6473.                     size to hold the data as it is entered.  Minimum size 
  6474.                     is fwidth+2.
  6475.           
  6476.                     On entry, the first byte of of all of the line 
  6477.                     buffers pointed to by ubuff[...] should be a null, 
  6478.                     otherwise wn_input assumes there is valid data there 
  6479.                     and will enter edit mode.  This can be handy if there 
  6480.                     is a need for prefilled, but editable fields.  In 
  6481.                     actual practice, wn_input uses these line buffers for 
  6482.                     both initial character data entry and subsequent 
  6483.                     editing.
  6484.  
  6485.                     On return, the line buffers contain the actual data 
  6486.                     entered in character format with fill and mask 
  6487.                     characters as spaces, eg: "This is a line of text ".
  6488.  
  6489.                     Editing keys are the same as wn_input with logical 
  6490.                     extensions for the UP and DOWN ARROW cursor keys.  
  6491.                     Normally both the UP and DOWN ARROW keys terminate 
  6492.                     input, they behave slightly differently here.  
  6493.                     Pressing the UP ARROW cursor key moves to the 
  6494.                     previous line homing the cursor if one exists or 
  6495.                     terminates input if a previous line does not exist.  
  6496.                     The DOWN ARROW cursor key behaves in a similar 
  6497.                     fashion for the next line.
  6498.  
  6499.             Calls wn_input to perform data entry.
  6500.           
  6501.             No validation is performed.
  6502.  
  6503.             No parameter checks are performed.  Pay particular attention 
  6504.             to the values passed for both fwidth and nl.
  6505.  
  6506.             Refer to "SAMPLE.C" for example(s) of usage.
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.                                                            Page: 106
  6522.                                                      The Window BOSS
  6523.  
  6524.  
  6525.  
  6526.         10.51. wn_gpword -- input password in window
  6527.  
  6528.         USAGE
  6529.  
  6530.           wn_gpword(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  6531.                    ubuff,hlpmsg,errmsg)
  6532.           
  6533.              int        fun - function code (SET || XEQ)
  6534.              (WIFORM)   frm - form pointer  (actual || NFRM)
  6535.              int        fld - field # in form (actual || NFLD)
  6536.              (WINDOWPTR) wn - window pointer
  6537.              int        row - row in window where data input begins
  6538.              int        col - col in window where data input begins
  6539.              (char *) prmpt - field prompt (call with NSTR for none)
  6540.              unsigned atrib - field (not prompt) attributes 
  6541.              char      fill - field fill character
  6542.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  6543.              (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6544.              (char *)hlpmsg - pointer to help message 
  6545.                               (call with NSTR for none)
  6546.              (char *)errmsg - pointer to err message 
  6547.                               (call with NSTR for none)
  6548.           
  6549.         RETURNS:
  6550.           
  6551.              ubuff with text data via pointer.
  6552.           
  6553.              NULL if error, else the non zero value returned from 
  6554.              wn_input.
  6555.           
  6556.              "wns_escape" is set to TRUE if the ESCape key caused 
  6557.              wn_input to terminate.  Set to FALSE otherwise.
  6558.  
  6559.         CAUTIONS and ADDITIONAL NOTES:
  6560.           
  6561.              fun - fun can only be SET for form setup, or XEQ for 
  6562.                    immediate execution.  When called with SET, valid 
  6563.                    arguments for both "frm" and "fld" must be specified.  
  6564.                    frm is the field pointer returned from wn_frmopn(), and 
  6565.                    fld is the field sequence number in the form for this 
  6566.                    field.  When called with XEQ frm must be NFRM and fld 
  6567.                    must be NFLD.
  6568.           
  6569.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  6570.                    the data as it is entered.  Minimum size is fwidth+2.
  6571.           
  6572.                    On entry, the first byte of ubuff should be a null. 
  6573.                    Since this function is for PASSWORD entry, editing is 
  6574.                    not available. The contents of the edit buffer on 
  6575.                    entry is ignored.
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.                                                            Page: 107
  6583.                                                      The Window BOSS
  6584.  
  6585.  
  6586.  
  6587.         wn_gpword - continued.
  6588.  
  6589.  
  6590.  
  6591.                     On return, ubuff contains the actual data entered in 
  6592.                     character format with fill and mask characters as 
  6593.                     spaces (e.g. "This is a line of text ").
  6594.           
  6595.             Calls wn_input to perform data entry.
  6596.           
  6597.             No validation is performed. 
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.  
  6614.  
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620.  
  6621.  
  6622.  
  6623.  
  6624.  
  6625.  
  6626.  
  6627.  
  6628.  
  6629.  
  6630.  
  6631.  
  6632.  
  6633.  
  6634.  
  6635.  
  6636.  
  6637.  
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.                                                            Page: 108
  6644.                                                      The Window BOSS
  6645.  
  6646.  
  6647.  
  6648.         10.52. wn_gint -- input integer in window
  6649.  
  6650.         USAGE
  6651.  
  6652.            wn_gint(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6653.                    fwidth,low,high,ubuff,hlpmsg,errmsg)
  6654.           
  6655.               int        fun - function code (SET || XEQ)
  6656.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6657.               int        fld - field # in form (actual || NFLD)
  6658.               (WINDOWPTR) wn - window pointer
  6659.               int        row - row in window where data input begins
  6660.               int        col - col in window where data input begins
  6661.               (char *) prmpt - field prompt (call with NSTR for none)
  6662.               unsigned atrib - field (not prompt) attributes 
  6663.               char      fill - field fill character
  6664.               (int *)  value - pointer to int for return value (low-high)
  6665.               int     fwidth - width of mask 
  6666.                                (maximum # of digits is 6 with sign)
  6667.               int        low - minimum value (lower limit of value)
  6668.               int       high - maximum value (upper limit of value)
  6669.               (char *) ubuff - pointer to char array of 10 bytes 
  6670.               (char *)hlpmsg - pointer to help message 
  6671.                                (call with NSTR for none)
  6672.               (char *)errmsg - pointer to err message 
  6673.                                (call with NSTR for none)
  6674.           
  6675.         RETURNS:
  6676.           
  6677.               value via pointer.
  6678.           
  6679.               NULL if error, else the non zero value returned from 
  6680.               wn_input.
  6681.           
  6682.               "wns_escape" is set to TRUE if the ESCape key caused 
  6683.               wn_input to terminate.  Set to FALSE otherwise.
  6684.  
  6685.         CAUTIONS and ADDITIONAL NOTES:
  6686.           
  6687.             fun -  fun can only be SET for form setup, or XEQ for 
  6688.                    immediate execution.  When called with SET, valid 
  6689.                    arguments for both "frm" and "fld" must be specified.  
  6690.                    frm is the field pointer returned from wn_frmopn(), and 
  6691.                    fld is the field sequence number in the form for this 
  6692.                    field.  When called with XEQ frm must be NFRM and fld 
  6693.                    must be NFLD.
  6694.           
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.                                                            Page: 109
  6705.                                                      The Window BOSS
  6706.  
  6707.  
  6708.  
  6709.         wn_gint - continued.  
  6710.  
  6711.  
  6712.  
  6713.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6714.                     the data as it is entered.  Minimum size is 10 bytes.
  6715.           
  6716.                     On entry, the first byte of ubuff should be a null, 
  6717.                     otherwise wn_input assumes there is valid data there 
  6718.                     and will enter edit mode.  This can be handy if there 
  6719.                     is a need for prefilled, but editable fields.  In 
  6720.                     actual practice, wn_input uses this buffer for both 
  6721.                     initial character data entry and subsequent editing.
  6722.  
  6723.                     On return, ubuff contains the actual data entered in 
  6724.                     character format with fill and mask characters as 
  6725.                     spaces.
  6726.           
  6727.             Calls wn_input to perform data entry.
  6728.           
  6729.             Data must satisfy validation checks for function to return.
  6730.           
  6731.             Calls wn_iemsg(errmsg) when validation fails.
  6732.  
  6733.             Refer to "SAMPLE.C" for example(s) of usage.
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.  
  6740.  
  6741.  
  6742.  
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.  
  6749.  
  6750.  
  6751.  
  6752.  
  6753.  
  6754.  
  6755.  
  6756.  
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764.  
  6765.                                                            Page: 110
  6766.                                                      The Window BOSS
  6767.  
  6768.  
  6769.  
  6770.         10.53. wn_guint - input unsigned integer in window
  6771.  
  6772.         USAGE
  6773.  
  6774.            wn_guint(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6775.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6776.           
  6777.               int        fun - function code (SET || XEQ)
  6778.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6779.               int        fld - field # in form (actual || NFLD)
  6780.               (WINDOWPTR)wn  - window pointer
  6781.               int        row - row in window where data input begins
  6782.               int        col - col in window where data input begins
  6783.               (char *) prmpt - field prompt (call with NSTR for none)
  6784.               unsigned atrib - field (not prompt) attributes 
  6785.               char      fill - field fill character
  6786.               (unsigned *) v - pointer to int for return value (low-high)
  6787.               int     fwidth - width of mask 
  6788.                                (maximum # of digits is 6 with sign)
  6789.               unsigned   low - minimum value (lower limit of value)
  6790.               unsigned  high - maximum value (upper limit of value)
  6791.               (char *) ubuff - pointer to char array of 10 bytes 
  6792.               (char *)hlpmsg - pointer to help message 
  6793.                                (call with NSTR for none)
  6794.               (char *)errmsg - pointer to err message 
  6795.                                (call with NSTR for none)
  6796.           
  6797.         RETURNS:
  6798.           
  6799.               v via pointer.
  6800.           
  6801.               NULL if error, else the non zero value returned from 
  6802.               wn_input.
  6803.           
  6804.               "wns_escape" is set to TRUE if the ESCape key caused 
  6805.               wn_input to terminate.  Set to FALSE otherwise.
  6806.  
  6807.         CAUTIONS and ADDITIONAL NOTES:
  6808.           
  6809.             fun -  fun can only be SET for form setup, or XEQ for 
  6810.                    immediate execution.  When called with SET, valid 
  6811.                    arguments for both "frm" and "fld" must be specified.  
  6812.                    frm is the field pointer returned from wn_frmopn(), and 
  6813.                    fld is the field sequence number in the form for this 
  6814.                    field.  When called with XEQ frm must be NFRM and fld 
  6815.                    must be NFLD.
  6816.           
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.                                                            Page: 111
  6827.                                                      The Window BOSS
  6828.  
  6829.  
  6830.  
  6831.         wn_guint - continued.
  6832.  
  6833.  
  6834.  
  6835.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6836.                    the data as it is entered.  Minimum size is 10 bytes.
  6837.  
  6838.                    On entry, the first byte of ubuff should be a null, 
  6839.                    otherwise wn_input assumes there is valid data there 
  6840.                    and will enter edit mode.  This can be handy if there 
  6841.                    is a need for prefilled, but editable fields.  In 
  6842.                    actual practice, wn_input uses this buffer for both 
  6843.                    initial character data entry and subsequent editing.
  6844.  
  6845.                    On return, ubuff contains the actual data entered in 
  6846.                    character format with fill and mask characters as 
  6847.                    spaces (e.g. "-24000").
  6848.           
  6849.             Calls wn_input to perform data entry.
  6850.           
  6851.             Data must satisfy validation checks for function to return.
  6852.           
  6853.             Calls wn_iemsg(errmsg) when validation fails.
  6854.  
  6855.             Refer to "SAMPLE.C" for example(s) of usage.
  6856.  
  6857.  
  6858.  
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.  
  6871.  
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.                                                            Page: 112
  6888.                                                      The Window BOSS
  6889.  
  6890.  
  6891.  
  6892.         10.54. wn_glong -- input long integer in window
  6893.  
  6894.         USAGE
  6895.  
  6896.            wn_glong(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6897.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6898.           
  6899.               int        fun - function code (SET || XEQ)
  6900.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6901.               int        fld - field # in form (actual || NFLD)
  6902.               (WINDOWPTR) wn - window pointer
  6903.               int        row - row in window where data input begins
  6904.               int        col - col in window where data input begins
  6905.               (char *) prmpt - field prompt (call with NSTR for none)
  6906.               unsigned atrib - field (not prompt) attributes 
  6907.               char      fill - field fill character
  6908.               (long*)  value - pointer to long for return value (low-high)
  6909.               int     fwidth - width of mask 
  6910.                                (maximum # of digits is 10 with sign)
  6911.               long       low - minimum value (lower limit of value)
  6912.               long      high - maximum value (upper limit of value)
  6913.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6914.               (char *)hlpmsg - pointer to help message 
  6915.                                (call with NSTR for none)
  6916.               (char *)errmsg - pointer to err message 
  6917.                                (call with NSTR for none)
  6918.           
  6919.         RETURNS:
  6920.           
  6921.               v via pointer.
  6922.           
  6923.               NULL if error, else the non zero value returned from 
  6924.               wn_input.
  6925.           
  6926.               "wns_escape" is set to TRUE if the ESCape key caused 
  6927.               wn_input to terminate.  Set to FALSE otherwise.
  6928.  
  6929.         CAUTIONS and ADDITIONAL NOTES:
  6930.           
  6931.             fun -  fun can only be SET for form setup, or XEQ for 
  6932.                    immediate execution.  When called with SET, valid 
  6933.                    arguments for both "frm" and "fld" must be specified.  
  6934.                    frm is the field pointer returned from wn_frmopn(), and 
  6935.                    fld is the field sequence number in the form for this 
  6936.                    field.  When called with XEQ frm must be NFRM and fld 
  6937.                    must be NFLD.
  6938.           
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.                                                            Page: 113
  6949.                                                      The Window BOSS
  6950.  
  6951.  
  6952.  
  6953.         wn_glong - continued.  
  6954.  
  6955.  
  6956.  
  6957.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6958.                    the data as it is entered.  Minimum size is fwidth+2.
  6959.           
  6960.                    On entry, the first byte of ubuff should be a null, 
  6961.                    otherwise wn_input assumes there is valid data there 
  6962.                    and will enter edit mode.  This can be handy if there 
  6963.                    is a need for prefilled, but editable fields.  In 
  6964.                    actual practice, wn_input uses this buffer for both 
  6965.                    initial character data entry and subsequent editing.
  6966.  
  6967.                    On return, ubuff contains the actual data entered in 
  6968.                    character format with fill and mask characters as 
  6969.                    spaces (e.g. "-24000").
  6970.           
  6971.             Calls wn_input to perform data entry.
  6972.           
  6973.             Data must satisfy validation checks for function to return.
  6974.           
  6975.             Calls wn_iemsg(errmsg) when validation fails.
  6976.  
  6977.             Refer to "SAMPLE.C" for example(s) of usage.
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.                                                            Page: 114
  7010.                                                      The Window BOSS
  7011.  
  7012.  
  7013.  
  7014.         10.55. wn_gulong -- input unsigned long integer in window
  7015.  
  7016.         USAGE
  7017.  
  7018.            wn_gulong(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  7019.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  7020.           
  7021.               int        fun - function code (SET || XEQ)
  7022.               (WIFORM)   frm - form pointer  (actual || NFRM)
  7023.               int        fld - field # in form (actual || NFLD)
  7024.               (WINDOWPTR) wn - window pointer
  7025.               int        row - row in window where data input begins
  7026.               int        col - col in window where data input begins
  7027.               (char *) prmpt - field prompt (call with NSTR for none)
  7028.               unsigned atrib - field (not prompt) attributes 
  7029.               char      fill - field fill character
  7030.               (unsigned long*) value - 
  7031.                                pointer to long for return value (low-high)
  7032.               int     fwidth - width of mask 
  7033.                                (maximum # of digits is 10 with sign)
  7034.               unsigned long low -
  7035.                                minimum value (lower limit of value)
  7036.               unsigned long high -
  7037.                                maximum value (upper limit of value)
  7038.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  7039.               (char *)hlpmsg - pointer to help message 
  7040.                                (call with NSTR for none)
  7041.               (char *)errmsg - pointer to err message 
  7042.                                (call with NSTR for none)
  7043.           
  7044.         RETURNS:
  7045.           
  7046.               v via pointer.
  7047.           
  7048.               NULL if error, else the non zero value returned from 
  7049.               wn_input.
  7050.           
  7051.               "wns_escape" is set to TRUE if the ESCape key caused 
  7052.               wn_input to terminate.  Set to FALSE otherwise.
  7053.  
  7054.         CAUTIONS and ADDITIONAL NOTES:
  7055.           
  7056.             fun -  fun can only be SET for form setup, or XEQ for 
  7057.                    immediate execution.  When called with SET, valid 
  7058.                    arguments for both "frm" and "fld" must be specified.  
  7059.                    frm is the field pointer returned from wn_frmopn(), and 
  7060.                    fld is the field sequence number in the form for this 
  7061.                    field.  When called with XEQ frm must be NFRM and fld 
  7062.                    must be NFLD.
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.                                                            Page: 115
  7071.                                                      The Window BOSS
  7072.  
  7073.  
  7074.  
  7075.         wn_gulong - continued.  
  7076.  
  7077.  
  7078.  
  7079.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  7080.                    the data as it is entered.  Minimun size is fwidth+2.
  7081.           
  7082.                    On entry, the first byte of ubuff should be a null, 
  7083.                    otherwise wn_input assumes there is valid data there 
  7084.                    and will enter edit mode.  This can be handy if there 
  7085.                    is a need for prefilled, but editable fields.  In 
  7086.                    actual practice, wn_input uses this buffer for both 
  7087.                    initial character data entry and subsequent editing.
  7088.                    On return, ubuff contains the actual data entered in 
  7089.                    character format with fill and mask characters as 
  7090.                    spaces (e.g. "-24000").
  7091.           
  7092.             Calls wn_input to perform data entry.
  7093.           
  7094.             Data must satisfy validation checks for function to return.
  7095.           
  7096.             Calls wn_iemsg(errmsg) when validation fails.
  7097.  
  7098.  
  7099.  
  7100.  
  7101.  
  7102.  
  7103.  
  7104.  
  7105.  
  7106.  
  7107.  
  7108.  
  7109.  
  7110.  
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.                                                            Page: 116
  7132.                                                      The Window BOSS
  7133.  
  7134.  
  7135.  
  7136.         10.56. wn_gfloat -- input float in window
  7137.  
  7138.         USAGE
  7139.  
  7140.            wn_gfloat(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  7141.                      fwidth,ndec,low,high,ubuff,hlpmsg,errmsg)
  7142.           
  7143.               int        fun - function code (SET || XEQ)
  7144.               (WIFORM)   frm - form pointer  (actual || NFRM)
  7145.               int        fld - field # in form (actual || NFLD)
  7146.               (WINDOWPTR) wn - window pointer
  7147.               int        row - row in window where data input begins
  7148.               int        col - col in window where data input begins
  7149.               (char *) prmpt - field prompt (call with NSTR for none)
  7150.               unsigned atrib - field (not prompt) attributes 
  7151.               char      fill - field fill character
  7152.               (float  *)   v - pointer to float for return value
  7153.               int     fwidth - width of mask 
  7154.                                (maximum # of digits is 20 with sign)
  7155.               int       ndec - # of decimal places 
  7156.               float      low - minimum value (lower limit of value)
  7157.               float     high - maximum value (upper limit of value)
  7158.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  7159.               (char *)hlpmsg - pointer to help message 
  7160.                                (call with NSTR for none)
  7161.               (char *)errmsg - pointer to err message 
  7162.                                (call with NSTR for none)
  7163.           
  7164.         RETURNS:
  7165.           
  7166.               v via pointer.
  7167.           
  7168.               NULL if error, else the non zero value returned from 
  7169.               wn_input.
  7170.           
  7171.               "wns_escape" is set to TRUE if the ESCape key caused 
  7172.               wn_input to terminate.  Set to FALSE otherwise.
  7173.  
  7174.         CAUTIONS and ADDITIONAL NOTES:
  7175.           
  7176.             fun -  fun can only be SET for form setup, or XEQ for 
  7177.                    immediate execution.  When called with SET, valid 
  7178.                    arguments for both "frm" and "fld" must be specified.  
  7179.                    frm is the field pointer returned from wn_frmopn(), and 
  7180.                    fld is the field sequence number in the form for this 
  7181.                    field.  When called with XEQ frm must be NFRM and fld 
  7182.                    must be NFLD.
  7183.           
  7184.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  7185.                    the data as it is entered.  Minimum size is fwidth+2. 
  7186.           
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.                                                            Page: 117
  7193.                                                      The Window BOSS
  7194.  
  7195.  
  7196.  
  7197.         wn_gfloat - continued.
  7198.  
  7199.  
  7200.                     
  7201.                    On entry, the first byte of ubuff should be a null, 
  7202.                    otherwise wn_input assumes there is valid data there 
  7203.                    and will enter edit mode.  This can be handy if there 
  7204.                    is a need for prefilled, but editable fields.  In 
  7205.                    actual practice, wn_input uses this buffer for both 
  7206.                    initial character data entry and subsequent editing.
  7207.  
  7208.                    On return, ubuff contains the actual data entered in 
  7209.                    character format with fill and mask characters as 
  7210.                    spaces (e.g. "   -1240.20").
  7211.           
  7212.             Calls wn_input to perform data entry.
  7213.           
  7214.             Data must satisfy validation checks for function to return.
  7215.           
  7216.             Calls wn_iemsg(errmsg) when validation fails.
  7217.  
  7218.             Refer to "SAMPLE.C" for example(s) of usage.
  7219.  
  7220.             WN_GFLOAT.C is provided in source form.
  7221.  
  7222.  
  7223.  
  7224.  
  7225.  
  7226.  
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.                                                            Page: 118
  7254.                                                      The Window BOSS
  7255.  
  7256.  
  7257.  
  7258.         10.57. wn_gdouble -- input double in window
  7259.  
  7260.         USAGE
  7261.  
  7262.            wn_gdouble(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  7263.                      fwidth,ndec,low,high,ubuff,hlpmsg,errmsg)
  7264.           
  7265.               int        fun - function code (SET || XEQ)
  7266.               (WIFORM)   frm - form pointer  (actual || NFRM)
  7267.               int        fld - field # in form (actual || NFLD)
  7268.               (WINDOWPTR) wn - window pointer
  7269.               int        row - row in window where data input begins
  7270.               int        col - col in window where data input begins
  7271.               (char *) prmpt - field prompt (call with NSTR for none)
  7272.               unsigned atrib - field (not prompt) attributes 
  7273.               char      fill - field fill character
  7274.               (double *)   v - pointer to float for return value
  7275.               int     fwidth - width of mask 
  7276.                                (maximum # of digits is 20 with sign)
  7277.               int       ndec - # of decimal places 
  7278.               double     low - minimum value (lower limit of value)
  7279.               double    high - maximum value (upper limit of value)
  7280.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  7281.               (char *)hlpmsg - pointer to help message 
  7282.                                (call with NSTR for none)
  7283.               (char *)errmsg - pointer to err message 
  7284.                                (call with NSTR for none)
  7285.           
  7286.         RETURNS:
  7287.           
  7288.               v via pointer.
  7289.           
  7290.               NULL if error, else the non zero value returned from 
  7291.               wn_input.
  7292.           
  7293.               "wns_escape" is set to TRUE if the ESCape key caused  
  7294.               wn_input to terminate.  Set to FALSE otherwise.
  7295.  
  7296.         CAUTIONS AND ADDITIONAL NOTES:
  7297.                       
  7298.               fun - fun can only be SET for form setup, or XEQ for 
  7299.                    immediate execution.  When called with SET, valid 
  7300.                    arguments for both "frm" and "fld" must be specified.  
  7301.                    frm is the field pointer returned from wn_frmopn(), 
  7302.                    and fld is the field sequence number in the form for 
  7303.                    this field.  When called with XEQ frm must be NFRM and 
  7304.                    fld must be NFLD.
  7305.                       
  7306.               ubuff - Editing buffer.  Must be of sufficient size to hold 
  7307.                    the data as it is entered.  Minimum size is fwidth+2. 
  7308.                       
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.                                                            Page: 119
  7315.                                                      The Window BOSS
  7316.  
  7317.  
  7318.  
  7319.                     wn_gdouble - continued.
  7320.  
  7321.  
  7322.                       
  7323.                    On entry, the first byte of ubuff should be a null, 
  7324.                    otherwise wn_input assumes there is valid data there 
  7325.                    and will enter edit mode.  This can be handy if there 
  7326.                    is a need for prefilled, but editable fields.  In 
  7327.                    actual practice, wn_input uses this buffer for both 
  7328.                    initial character data entry and subsequent editing.
  7329.  
  7330.                    On return, ubuff contains the actual data entered in 
  7331.                    character format with fill and mask characters as 
  7332.                    spaces (e.g. "   -1240.20").
  7333.                       
  7334.                         Calls wn_input to perform data entry.
  7335.                       
  7336.                    Data must satisfy validation checks for function to 
  7337.                    return.
  7338.                       
  7339.                    Calls wn_iemsg(errmsg) when validation fails.
  7340.  
  7341.  
  7342.  
  7343.  
  7344.  
  7345.  
  7346.  
  7347.  
  7348.  
  7349.  
  7350.  
  7351.  
  7352.  
  7353.  
  7354.  
  7355.  
  7356.  
  7357.  
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.                                                            Page: 120
  7376.                                                      The Window BOSS
  7377.  
  7378.  
  7379.  
  7380.         10.58. wn_gbool -- input logical in window
  7381.  
  7382.         USAGE
  7383.  
  7384.           wn_gbool(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  7385.                    ubuff,hlpmsg,errmsg)
  7386.                       
  7387.               int        fun - function code (SET || XEQ)
  7388.               (WIFORM)   frm - form pointer  (actual || NFRM)
  7389.               int        fld - field # in form (actual || NFLD)
  7390.               (WINDOWPTR) wn - window pointer
  7391.               int        row - row in window where data input begins
  7392.               int        col - col in window where data input begins
  7393.               (char *) prmpt - field prompt (call with NSTR for none)
  7394.               unsigned atrib - field (not prompt) attributes 
  7395.               char      fill - field fill character
  7396.               (int *)  value - pointer to int for value (0=FALSE, 1=TRUE)
  7397.               (char *) ubuff - pointer to char array of 3 bytes 
  7398.               (char *)hlpmsg - pointer to help message 
  7399.                                (call with NSTR for none)
  7400.               (char *)errmsg - pointer to err message 
  7401.                                (call with NSTR for none)
  7402.           
  7403.         RETURNS:
  7404.           
  7405.               value via pointer (0=FALSE, 1=TRUE)
  7406.           
  7407.               NULL if error, else the non zero value returned from 
  7408.               wn_input.
  7409.           
  7410.               "wns_escape" is set to TRUE if the ESCape key caused 
  7411.               wn_input to terminate.  Set to FALSE otherwise.
  7412.  
  7413.         CAUTIONS and ADDITIONAL NOTES:
  7414.           
  7415.             fun -  fun can only be SET for form setup, or XEQ for 
  7416.                    immediate execution.  When called with SET, valid 
  7417.                    arguments for both "frm" and "fld" must be specified.  
  7418.                    frm is the field pointer returned from wn_frmopn(), and 
  7419.                    fld is the field sequence number in the form for this 
  7420.                    field.  When called with XEQ frm must be NFRM and fld 
  7421.                    must be NFLD.
  7422.           
  7423.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  7424.                    the data as it is entered.  Minimum size is 3 bytes.f
  7425.           
  7426.                    On entry, the first byte of ubuff should be a null, 
  7427.                    otherwise wn_input assumes there is valid data there 
  7428.                    and will enter edit mode.  This can be handy if there 
  7429.                    is a need for prefilled, but editable fields.  In 
  7430.                    actual practice, wn_input uses this buffer for both 
  7431.                    initial character data entry and subsequent editing.
  7432.  
  7433.  
  7434.  
  7435.  
  7436.                                                            Page: 121
  7437.                                                      The Window BOSS
  7438.  
  7439.  
  7440.  
  7441.         wn_gbool - continued.
  7442.  
  7443.  
  7444.  
  7445.                    On return, ubuff contains the actual data entered in 
  7446.                    character format with fill and mask characters as 
  7447.                    spaces (e.g. "T").
  7448.           
  7449.             Calls wn_input to perform data entry.
  7450.           
  7451.             User MUST enter T,F,Y, or N.
  7452.           
  7453.             Data must satisfy validation checks for function to return.
  7454.           
  7455.             Calls wn_iemsg(errmsg) when validation fails.
  7456.           
  7457.             Refer to "SAMPLE.C" for example(s) of usage.
  7458.  
  7459.  
  7460.  
  7461.  
  7462.  
  7463.  
  7464.  
  7465.  
  7466.  
  7467.  
  7468.  
  7469.  
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.  
  7493.  
  7494.  
  7495.  
  7496.  
  7497.                                                            Page: 122
  7498.                                                      The Window BOSS
  7499.  
  7500.  
  7501.  
  7502.         10.59. wn_dtext -- display text on input form
  7503.  
  7504.         USAGE
  7505.  
  7506.            wn_dtext(fun,frm,fld,wn,row,col,prmpt)
  7507.           
  7508.               int        fun - function code (SET || XEQ)
  7509.               (WIFORM)   frm - form pointer  (actual || NFRM)
  7510.               int        fld - field # in form (actual || NFLD)
  7511.               (WINDOWPTR) wn - window pointer
  7512.               int        row - row in window where data input begins
  7513.               int        col - col in window where data input begins
  7514.               (char *) prmpt - field prompt (call with NSTR for none)
  7515.           
  7516.         RETURNS:
  7517.           
  7518.               TRUE if fun==SET 
  7519.           
  7520.                or
  7521.           
  7522.               Normal return value of wn_puts if fun==XEQ
  7523.           
  7524.         CAUTIONS and ADDITIONAL NOTES:
  7525.           
  7526.             fun -  fun can only be SET for form setup, or XEQ for 
  7527.                    immediate execution.  When called with SET, valid 
  7528.                    arguments for both "frm" and "fld" must be specified.  
  7529.                    frm is the field pointer returned from wn_frmopn(), and 
  7530.                    fld is the field sequence number in the form for this 
  7531.                    field.  When called with XEQ frm must be NFRM and fld 
  7532.                    must be NFLD.
  7533.  
  7534.             Refer to "SAMPLE.C" for example(s) of usage.
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.  
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.                                                            Page: 123
  7559.                                                      The Window BOSS
  7560.  
  7561.  
  7562.  
  7563.         10.60. wn_iemsg -- display input error message
  7564.  
  7565.         USAGE
  7566.  
  7567.            wn_iemsg(msg)
  7568.           
  7569.               (char *)   msg - pointer to message to be displayed.
  7570.           
  7571.         RETURNS:
  7572.           
  7573.               NULL if error, else TRUE
  7574.           
  7575.         CAUTIONS and ADDITIONAL NOTES:
  7576.           
  7577.             This routine should be modified or replaced with code to suit 
  7578.             your application's specific needs.  It hooks to wn_g???? 
  7579.             such that whenever the field validation fails wn_g???? calls 
  7580.             wn_iemsg to display an error message for the field in 
  7581.             question.  The hooks in wn_g????? are of the form:
  7582.           
  7583.                 if(validation failed) wn_iemsg(msg);
  7584.           
  7585.             This routine displays a single line of text on the 25th line 
  7586.             and waits for a key to be struck before returning to accept 
  7587.             new data for the field in question.
  7588.           
  7589.             The error message can be a maximum of 80 characters, and must 
  7590.             not contain any formatting directives (\n\t...).
  7591.           
  7592.             Some wn_g???? functions (i.e. wn_gtext) have no provision to 
  7593.             validate data and therefore never attempt to call this 
  7594.             routine.
  7595.  
  7596.             WN_IEMSG.C is provided in source form.
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.                                                            Page: 124
  7620.                                                      The Window BOSS
  7621.  
  7622.  
  7623.  
  7624.         10.61. wn_ihmsg -- display input help message
  7625.           
  7626.         USAGE
  7627.           
  7628.            wn_ihmsg(msg)
  7629.           
  7630.               (char *)   msg - pointer to message to be displayed.
  7631.           
  7632.         RETURNS:
  7633.           
  7634.             NULL if error, else TRUE
  7635.           
  7636.         CAUTIONS and ADDITIONAL NOTES:
  7637.           
  7638.             This routine should be modified or replaced with code to suit 
  7639.             your application's specific needs.  It hooks to wn_input 
  7640.             such that whenever the HELP key is pressed wn_input calls 
  7641.             wn_ihmsg to display a help message for the field in question.  
  7642.             The hooks in wn_input are of the form:
  7643.           
  7644.                 if(key_struck == HELP) wn_ihmsg(msg);
  7645.           
  7646.             The F1 key is the default HELP key.  This can be changed by 
  7647.             calling the wns_shkey() function.
  7648.  
  7649.             This routine displays a single line of help on the 25th line 
  7650.             and waits for a key to be struck before returning.
  7651.           
  7652.             The help message can be a maximum of 80 characters, and must 
  7653.             not contain any formatting directives (\n\t...).
  7654.  
  7655.             WN_IHMSG is provided in source form.
  7656.  
  7657.  
  7658.         10.62. wn_shkey -- set HELP key code
  7659.  
  7660.         USAGE
  7661.  
  7662.             wn_shkey(code)
  7663.             unsigned int code;
  7664.  
  7665.               code - scancode of the key to be defined as the HELP key.
  7666.  
  7667.             F1 is the default HELP key.  The scancode for F1 is 0x3B00.              
  7668.  
  7669.         RETURNS
  7670.  
  7671.              Nothing.
  7672.  
  7673.         CAUTIONS and ADDITIONAL NOTES:
  7674.  
  7675.              SCANCODE.C can be used to determine the scancodes for any 
  7676.              and all keys.
  7677.  
  7678.  
  7679.  
  7680.                                                            Page: 125
  7681.                                                      The Window BOSS
  7682.  
  7683.  
  7684.  
  7685.         10.63. wn_popup -- display and act on popup menu
  7686.  
  7687.         USAGE
  7688.  
  7689.           wn_popup(page,row,col,width,height,atrib,batrib,mx,cflag)
  7690.           int page, row, col, width, height, cflag;
  7691.           unsigned int atrib, batrib;
  7692.           struct pmenu *mx;
  7693.  
  7694.              page -    video page (Always 0)
  7695.              row  -    row of origin 
  7696.              col  -    col of origin 
  7697.              width -   width (inside dimension)
  7698.              height -  height (inside dimension)
  7699.              atrib -   window attribute
  7700.              batrib -  border attribute
  7701.              mx -      pointer to menu structure
  7702.              cflag -   close on return flag (FALSE to leave open)
  7703.  
  7704.           The pmenu structure is defined in "winboss.h" (replicated here 
  7705.           for clarity) and must be initialized prior to calling wn_popup.
  7706.  
  7707.           struct mitem {              /* POPUP menu item template */
  7708.             int r;                    /* row */
  7709.             int c;                    /* col */
  7710.             char *t;                  /* text */
  7711.             int rv;                   /* return value */
  7712.           };
  7713.  
  7714.           struct pmenu {              /* POPUP menu structure */
  7715.             WINDOWPTR wpsave;         /* place to hold window id */
  7716.             int winopn;               /* leave window open flag */
  7717.             int lndx;                 /* last index */
  7718.             int fm;                   /* first menu item index */
  7719.             int lm;                   /* last menu item index */
  7720.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  7721.           };                          /* NOTE RELATIVE LIMIT */
  7722.  
  7723.         RETURNS:
  7724.  
  7725.           The return code for the menu item selected or 99 if ESCape is 
  7726.           pressed.
  7727.  
  7728.         CAUTIONS and ADDITIONAL NOTES:
  7729.  
  7730.           None.
  7731.  
  7732.         SEE ALSO
  7733.  
  7734.           Popup menu basics.
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.                                                            Page: 126
  7742.                                                      The Window BOSS
  7743.  
  7744.  
  7745.  
  7746.         10.64. wn_qpopup -- display quick popup window
  7747.  
  7748.         USAGE
  7749.  
  7750.           WINDOPTR wn_qpopup(page,row,col,width,height,atrib,batrib,mx)
  7751.           int page, row, col, width, height, cflag;
  7752.           unsigned int atrib, batrib;
  7753.           struct pmenu *mx;
  7754.  
  7755.              page -    video page (Always 0)
  7756.              row  -    row of origin (0 to WN_MAXROWS)
  7757.              col  -    col of origin (0 to WN_MAXCOLS)
  7758.              width -   width (inside dimension)
  7759.              height -  height (inside dimension)
  7760.              atrib -   window attribute
  7761.              batrib -  border attribute
  7762.              mx -      pointer to menu structure
  7763.  
  7764.           The pmenu structure is defined in "winboss.h" (replicated here 
  7765.           for clarity) and must be initialized prior to calling wn_popup.
  7766.  
  7767.           struct mitem {              /* POPUP menu item template */
  7768.             int r;                    /* row */
  7769.             int c;                    /* col */
  7770.             char *t;                  /* text */
  7771.             int rv;                   /* return value */
  7772.           };
  7773.  
  7774.           struct pmenu {              /* POPUP menu structure */
  7775.             WINDOWPTR wpsave;         /* place to hold window id */
  7776.             int winopn;               /* leave window open flag */
  7777.             int lndx;                 /* last index */
  7778.             int fm;                   /* first menu item index */
  7779.             int lm;                   /* last menu item index */
  7780.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  7781.           };                          /* NOTE RELATIVE LIMIT */
  7782.  
  7783.         RETURNS:
  7784.  
  7785.           A WINDOWPTR to the popup window that has been displayed.
  7786.  
  7787.         CAUTIONS and ADDITIONAL NOTES:
  7788.  
  7789.           None.
  7790.  
  7791.         SEE ALSO
  7792.  
  7793.           Popup menu basics.
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.                                                            Page: 127
  7803.                                                      The Window BOSS
  7804.  
  7805.  
  7806.  
  7807.         10.65. wh_hlinit -- initialize help system
  7808.  
  7809.         USAGE
  7810.  
  7811.           wn_hlinit(row, col, width, height, atrib, batrib, file)
  7812.           int page, row, col, width, height, atrib, batrib;
  7813.           char *file;
  7814.  
  7815.                 row  -  row of upper left hand corner of the window
  7816.                 col  -  column of upper left hand corner of the window
  7817.                 width - INSIDE dimension (max value is 78 for a 80 column 
  7818.                         wide display)
  7819.                 height- INSIDE dimension (max value is 23 for a 25 row 
  7820.                         high display)
  7821.                 atrib - attribute to be used IN the window
  7822.                 batrib- attribute to be used for the border
  7823.                 file  - help file name (assumes ".HLP" extension)
  7824.           
  7825.           Unless you modify the code in WN_HELP.C, wn_hlint calls should 
  7826.           always take the form of:
  7827.  
  7828.             wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),file);
  7829.                       |                                       |  | 
  7830.                       +--------------\/-----------------------+  |
  7831.                                   Use as is                      |
  7832.                                                                  |
  7833.                                     YOUR ".HLP" file's name -----+                                                    
  7834.  
  7835.           Unless you modify the code in WN_HELP.C, "HLP" files should be 
  7836.           formatted according to the following convention:
  7837.  
  7838.              %key_word%  - max 25 characters, ALWAYS begin in position 1,
  7839.                            always enclosed within percent signs.
  7840.  
  7841.              text        - starts in column 3, ends in 76, contains a                  
  7842.                            maximum of 20 lines per screen. Text, 
  7843.                            including any leading and/or trailing blank 
  7844.                            lines and/or spaces is always immediately 
  7845.                            preceded by a key word or the .cp command. 
  7846.                            (Use blank lines at the top to center 
  7847.                            vertically.  Use spaces at the left of each 
  7848.                            line to center horizontally.)
  7849.  
  7850.              .cp         - starts in column 1. Command that signals end 
  7851.                            of screen in a series of 2 or more help 
  7852.                            screens.  Precedes or succeeds text.
  7853.  
  7854.              *END*       - starts in column 1. Command that signals end
  7855.                            of help. Succeeds text.
  7856.  
  7857.  
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.                                                            Page: 128
  7864.                                                      The Window BOSS
  7865.  
  7866.  
  7867.  
  7868.         wn_hlinit - continued.
  7869.  
  7870.  
  7871.  
  7872.           A typical HLP file would look something like.
  7873.  
  7874.              00000...............................................77778
  7875.              12345...............................................67890
  7876.  
  7877.              %subject 1%
  7878.                            Title of Screen 1 - Subject 1
  7879.              
  7880.                This is a sample help screen for screen number 1 
  7881.                of a multi screen message.
  7882.              .cp
  7883.                            Title of Screen 2 - Subject 1
  7884.  
  7885.                This the second screen of a multi screen help 
  7886.                message for subject1.
  7887.              *END*
  7888.  
  7889.              %subject 2%
  7890.                            Title of Screen 1 - Subject 2     
  7891.  
  7892.                This is a sample help screen for a single screen 
  7893.                help message.
  7894.              *END*
  7895.  
  7896.           Later, when wn_help is called, text will be sequentially 
  7897.           displayed a screen at a time from the subject keyword through 
  7898.           any number of .cp delimited screens through and including the 
  7899.           screen delimited by *END*.  The system allows for forward and 
  7900.           reverse display via the PgUp and PgDn keys.  The .cp signals 
  7901.           the end of a single screen in a series of 2 or more screens.  
  7902.           When .cp is detected, the message  "Esc to quit help, PgUp for 
  7903.           previous screen, any other key to continue..." will be 
  7904.           displayed.  When *END* is detected, the message "End of help, 
  7905.           PgUp for previous screen, any other key to continue..." is 
  7906.           displayed.  
  7907.  
  7908.         RETURNS:
  7909.  
  7910.           TRUE if all is well.
  7911.  
  7912.           FALSE the help file (.HLP) or its index file (.NDX) could not 
  7913.           be found or open.  A FALSE return can also be caused by a lack 
  7914.           of free memory for the memory resident file index or the file 
  7915.           buffers themselves.
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.                                                            Page: 129
  7925.                                                      The Window BOSS
  7926.  
  7927.  
  7928.  
  7929.         wn_hlinit - continued.
  7930.  
  7931.  
  7932.  
  7933.         CAUTIONS and ADDITIONAL NOTES:
  7934.  
  7935.           wn_hlinit requires both the ".HLP" and ".NDX" files to be 
  7936.           present when called. "NDX" files are produced by GENINDEX.  The 
  7937.           source to GENINDEX can be found in GENINDEX.C.  
  7938.  
  7939.           As implemented, the help system is configured to provide a full 
  7940.           screen text message, subject keys are limited to 25 characters, 
  7941.           and there is a limit of 255 subject keys per file.  This can be 
  7942.           changed by modifying the functions found in "wn_help.c"  THERE 
  7943.           IS A DIRECT CORRELATION BETWEEN THE PARAMETERS USED TO 
  7944.           INITIALIZE THE HELP SYSTEM AND THE LAYOUT OF THE ASCII TEXT 
  7945.           FILE READ BY THE GENINDEX PROGRAM.  If you modify the code be 
  7946.           sure to modify the location and text of the messages to be 
  7947.           displayed when .cp and/or *END* are dectected.
  7948.  
  7949.         SEE ALSO
  7950.  
  7951.           Help system basics, wn_help
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.                                                            Page: 130
  7986.                                                      The Window BOSS
  7987.  
  7988.  
  7989.  
  7990.         10.66. wn_help -- display help message 
  7991.  
  7992.         USAGE
  7993.  
  7994.           wn_help(key_word)
  7995.           char *key_word;
  7996.  
  7997.              char *key_word - valid keyword contained in help file named 
  7998.                               in the call to wn_hlinit.
  7999.  
  8000.           The text associated with the key_word will be sequentially 
  8001.           displayed a screen at a time from the subject keyword through 
  8002.           any number of .cp delimited screens through and including the 
  8003.           screen delimited by *END*.  The system allows for forward and 
  8004.           reverse display via the PgUp and PgDn keys.  The .cp signals 
  8005.           the end of a single screen in a series of 2 or more screens.  
  8006.           When .cp is detected, the message  "Esc to quit help, PgUp for 
  8007.           previous screen, any other key to continue..." will be 
  8008.           displayed.  When *END* is detected, the message "End of help, 
  8009.           PgUp for previous screen, any other key to continue..." is 
  8010.           displayed.  
  8011.  
  8012.         RETURNS:
  8013.                                
  8014.           TRUE if all is well. 
  8015.  
  8016.           FALSE if system has not been initialzied, the . HLP file can 
  8017.           not be found,  or the keyword passed could not be found in the 
  8018.           memory resident index.
  8019.  
  8020.         CAUTIONS and ADDITIONAL NOTES:
  8021.  
  8022.           None.
  8023.  
  8024.         SEE ALSO
  8025.  
  8026.           wn_hlinit
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.                                                            Page: 131
  8047.                                                      The Window BOSS
  8048.  
  8049.  
  8050.  
  8051.         10.67. wn_sleftj -- (string) left justify 
  8052.  
  8053.         USAGE
  8054.  
  8055.              wn_sleftj(str)
  8056.  
  8057.                   (char *) str - string to left justify
  8058.           
  8059.         RETURNS:
  8060.  
  8061.              Pointer to str.
  8062.           
  8063.         CAUTIONS and ADDITIONAL NOTES:
  8064.  
  8065.              The string str is left justified in place. 
  8066.  
  8067.              This funtion should not be used with literal character 
  8068.              strings (e.g. wn_sleft(" left justify this");).
  8069.  
  8070.              Leading white space is converted to trailing white space.
  8071.  
  8072.  
  8073.         10.68. wn_srightj -- (string) right justify 
  8074.  
  8075.         USAGE
  8076.  
  8077.              wn_srightj(str)
  8078.  
  8079.                   (char *) str - string to right justify.
  8080.  
  8081.         RETURNS:
  8082.  
  8083.              Pointer to str.
  8084.  
  8085.         CAUTIONS and ADDITIONAL NOTES:
  8086.  
  8087.              The string str is right justified in place.  
  8088.  
  8089.              This funtion should not be used with literal character 
  8090.              strings (e.g. wn_srightj("right justify this   ");).
  8091.  
  8092.              Trailing white space is converted to leading white space.
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.                                                            Page: 132
  8108.                                                      The Window BOSS
  8109.  
  8110.  
  8111.  
  8112.         10.69. wn_scenter -- (string) center 
  8113.  
  8114.         USAGE
  8115.  
  8116.              wn_scenter(sr,tr,w)
  8117.  
  8118.                   (char *) sr - the string to center - source
  8119.                   (char *) tr - the centered string  - target
  8120.                                 tr contains the results of centering
  8121.                   int w       - desired width of centered string 
  8122.           
  8123.         RETURNS:
  8124.  
  8125.              Pointer to tr.
  8126.           
  8127.         CAUTIONS and ADDITIONAL NOTES:
  8128.  
  8129.              tr must be a pointer to a character array of at least
  8130.              w+1 in size.
  8131.  
  8132.              The source string pointed to by sr is not altered in any 
  8133.              way.
  8134.  
  8135.              Both leading and trailing white space of the source string 
  8136.              are considered part of the string to be centered.
  8137.                                       
  8138.                                       Desired Width (W)
  8139.                         |------------------------------------------|
  8140.  
  8141.                   source "this is a simple example"
  8142.                   target|         this is a simple example         |
  8143.  
  8144.                   source "        this is an example toooo"
  8145.                   target|             this is an example toooo     |
  8146.  
  8147.              This fuction is intended to deal with strings that do not 
  8148.              have leading or trailing white space.  WN_SDELSPC can be 
  8149.              called to prepare the string for centering.
  8150.  
  8151.  
  8152.  
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.                                                            Page: 133
  8169.                                                      The Window BOSS
  8170.  
  8171.  
  8172.  
  8173.         10.70. wn_sdelspc -- (string) delete leading/trailing spaces
  8174.  
  8175.         USAGE
  8176.  
  8177.              wn_sdelspc(str, code)
  8178.  
  8179.                   char *str - string to be treated
  8180.                   int code  - operation code:
  8181.                                 1 = delete leading
  8182.                                 2 = delete trailing
  8183.                                 3 = delete both
  8184.           
  8185.         RETURNS:
  8186.  
  8187.              Pointer to str.
  8188.  
  8189.         CAUTIONS and ADDITIONAL NOTES:
  8190.  
  8191.              All operations are performed in place.
  8192.  
  8193.              This funtion should not be used with literal character 
  8194.              strings (e.g. wn_sdelspc(" mumble fratz  ", 3);).
  8195.  
  8196.  
  8197.         10.71. wn_strndx -- (string) return index of s2 in s1
  8198.  
  8199.         USAGE
  8200.  
  8201.              wn_strndx(s1,s2,off)
  8202.  
  8203.                   (char *) s1 - pointer to string s1
  8204.                   (char *) s2 - pointer to string s2
  8205.                   int off     - s1 offset for search start
  8206.                     
  8207.         RETURNS:
  8208.  
  8209.              The index (a.k.a. subscript or offset) of where s2 begins in 
  8210.              s1, or (-1) if s2 could not be found in s1.
  8211.  
  8212.  
  8213.         CAUTIONS and ADDITIONAL NOTES:
  8214.  
  8215.              A value for "off" must be provided. 
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.                                                            Page: 134
  8230.                                                      The Window BOSS
  8231.  
  8232.  
  8233.  
  8234.         10.72. mo_reset -- reset/init mouse
  8235.  
  8236.         USAGE
  8237.  
  8238.              ms = (MOUSEPTR) mo_reset()
  8239.              MOUSEPTR ms;
  8240.  
  8241.                   ms - mouse handle 
  8242.  
  8243.              mo_reset() must be the 1st mouse function called.
  8244.  
  8245.              Low level and applications level interface function.
  8246.  
  8247.         RETURNS
  8248.  
  8249.              mo = mouse handle or MOLPTR (null) if error
  8250.  
  8251.         CAUTIONS and ADDITIONAL NOTES
  8252.  
  8253.              Any program that uses a mouse must first initialize it in 
  8254.              order to avoid dealing with the mouse in an unknown state.  
  8255.              This function clears the mouse status to a "power on" state, 
  8256.              places the mouse's cursor in the center of the screen 
  8257.              (although hidden) and sets the mouse's active region to the 
  8258.              full screen.
  8259.  
  8260.              Requires "winboss.h" to be "#include"d.
  8261.  
  8262.              MOUSEPTR is defined in "winboss.h"     
  8263.  
  8264.              Example:
  8265.  
  8266.                   #include "winboss.h"
  8267.                   main()
  8268.                   {
  8269.                   MOUSEPTR ms;
  8270.                        ms=mo_reset();           /* init mouse */
  8271.                        if(ms) {
  8272.                             .....               /* do other things */
  8273.                             exit(0);            /* finito */
  8274.                        }
  8275.                        else {
  8276.                             ... no mouse
  8277.                        }
  8278.                   }
  8279.                   /* End */
  8280.  
  8281.  
  8282.  
  8283.  
  8284.  
  8285.  
  8286.  
  8287.  
  8288.  
  8289.  
  8290.                                                            Page: 135
  8291.                                                      The Window BOSS
  8292.  
  8293.  
  8294.  
  8295.         10.73. mo_show -- show mouse
  8296.  
  8297.         USAGE
  8298.  
  8299.              mo_show(ms)
  8300.              MOUSEPTR ms;
  8301.  
  8302.                   ms - mouse handle
  8303.  
  8304.              Display (show, unhide) the mouse cursor.  
  8305.              
  8306.              Low level and applications level interface function.
  8307.  
  8308.         RETURNS
  8309.  
  8310.              Nothing.     
  8311.  
  8312.         CAUTIONS and ADDITIONAL NOTES
  8313.  
  8314.              Example:
  8315.  
  8316.                   #include "winboss.h"
  8317.                   main()
  8318.                   {
  8319.                   MOUSEPTR ms;
  8320.                        ms=mo_reset();           /* init mouse */
  8321.                        if(ms) {
  8322.                             mo_show(ms);        /* show mouse */
  8323.                             .....               /* do other things */
  8324.                             exit(0);            /* finito */
  8325.                        }
  8326.                        else {
  8327.                             ... no mouse
  8328.                        }
  8329.                   }
  8330.                   /* End */
  8331.  
  8332.              Failure to call mo_show() will cause the mouse to never be 
  8333.              displayed.  mo_show() is usually called after mo_reset().
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.                                                            Page: 136
  8352.                                                      The Window BOSS
  8353.  
  8354.  
  8355.  
  8356.         10.74. mo_hide -- hide mouse
  8357.  
  8358.         USAGE
  8359.  
  8360.              mo_hide(ms)
  8361.              MOUSEPTR ms;
  8362.  
  8363.                   ms - mouse handle
  8364.  
  8365.              Hide (unshow, make invisible) the mouse cursor.  
  8366.  
  8367.              Low level and applications level interface function.
  8368.  
  8369.         RETURNS
  8370.  
  8371.              Nothing.
  8372.  
  8373.         CAUTIONS and ADDITIONAL NOTES
  8374.  
  8375.              The only way to display the mouse cursor after it is hidden 
  8376.              is by calling mo_show().
  8377.  
  8378.              Example:
  8379.  
  8380.                   #include "winboss.h"
  8381.                   main()
  8382.                   {
  8383.                   MOUSEPTR ms;
  8384.                        ms=mo_reset();           /* init mouse */
  8385.                        if(ms) {
  8386.                             mo_show(ms);        /* show mouse */
  8387.                             v_getch();          /* wait for key hit */
  8388.                             mo_hide(ms);        /* hide mouse */
  8389.                             exit(0);            /* finito */
  8390.                        }
  8391.                        else {
  8392.                             ... no mouse
  8393.                        }
  8394.                   }
  8395.                   /* End */
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.                                                            Page: 137
  8413.                                                      The Window BOSS
  8414.  
  8415.  
  8416.  
  8417.         10.75. mo_pos -- get mouse pixel position & status
  8418.  
  8419.         USAGE
  8420.  
  8421.              mo_pos(ms)
  8422.              MOUSEPTR ms;
  8423.  
  8424.                   ms - mouse handle
  8425.  
  8426.              This function updates the mouse control block with current 
  8427.              mouse status information - physical location and button 
  8428.              status.  This information is provided in real time and in 
  8429.              the mouse's 640 x 200 pixel array corrdinate system.
  8430.  
  8431.              Low level interface function.
  8432.  
  8433.         RETURNS
  8434.  
  8435.              Nothing. 
  8436.  
  8437.              Updates - Members of the mouse control block:
  8438.  
  8439.                ms->bstat - bit 0 set if left button is CURRENTLY down 
  8440.                            bit 1 set if right button is CURRENTLY down
  8441.                            bit 2 set if center button is CURRENTLY down
  8442.                                       
  8443.                ms->row   - mouse pixel row location 
  8444.                ms->col   - mouse pixel col location
  8445.  
  8446.         CAUTIONS and ADDITIONAL NOTES
  8447.  
  8448.              All information is reported in real time.  If the mouse is 
  8449.              in the process of being moved, the information returned may 
  8450.              not be indicative of the final destination. 
  8451.  
  8452.              This funtion is typically used in graphics mode (which The 
  8453.              Window BOSS does not support).  It is handy for "etch-a-
  8454.              sketch" type pixel drawing programs.  
  8455.  
  8456.              Making infrequent calls to this routine can cause your 
  8457.              program to miss button clicks. 
  8458.  
  8459.              Text (80x25) row and column coordinates can be determined by 
  8460.              dividing m->row and m->col by 8.
  8461.  
  8462.              The recommended way to obtain accurate information in a more 
  8463.              useful format is by using mo_wait in conjunction with 
  8464.              mo_rcpos.
  8465.  
  8466.  
  8467.              Also see "mo_rcpos", "mo_wait".
  8468.  
  8469.  
  8470.  
  8471.  
  8472.  
  8473.                                                            Page: 138
  8474.                                                      The Window BOSS
  8475.  
  8476.  
  8477.  
  8478.         10.76. mo_move -- move mouse pixel cursor
  8479.  
  8480.         USAGE
  8481.  
  8482.              mo_move(ms, row, col)
  8483.              MOUSEPTR ms;
  8484.              int row,col;
  8485.  
  8486.                   ms -  mouse handle
  8487.                   row - new pixel row value 
  8488.                   col - new pixel col value
  8489.  
  8490.              This function moves the mouse to a new physical location in 
  8491.              the mouse's 640 x 200 pixel array coordinate system.
  8492.  
  8493.              Low level interface function.
  8494.  
  8495.         RETURNS
  8496.  
  8497.              Nothing.
  8498.  
  8499.         CAUTIONS and ADDITIONAL NOTES
  8500.  
  8501.              Pixel row and column coordinates can be determined by 
  8502.              multiplying the text (80x25) coordinates by 8.  
  8503.  
  8504.              Also see "mo_locate".
  8505.  
  8506.  
  8507.  
  8508.  
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.  
  8527.  
  8528.  
  8529.  
  8530.  
  8531.  
  8532.  
  8533.  
  8534.                                                            Page: 139
  8535.                                                      The Window BOSS
  8536.  
  8537.  
  8538.  
  8539.         10.77. mo_pbinfo -- get pressed mouse botton status
  8540.  
  8541.         USAGE
  8542.  
  8543.              mo_pbinfo(ms,button)
  8544.              MOUSEPTR ms;
  8545.              int button;
  8546.  
  8547.                   ms     -  mouse handle
  8548.                   button -  button of interest (MO_LEFT or MO_RIGHT)
  8549.  
  8550.              Low level interface function.
  8551.  
  8552.         RETURNS
  8553.  
  8554.              Nothing. 
  8555.  
  8556.              Updates - Members of the mouse control block:
  8557.  
  8558.                ms->bstat  - bit 0 set if left button is CURRENTLY down 
  8559.                             bit 1 set if right button is CURRENTLY down
  8560.                             bit 2 set if center button is CURRENTLY down
  8561.                ms->nclick - number of times the requseted button has 
  8562.                             been pressed since last call.
  8563.                ms->row    - mouse pixel row location of last press
  8564.                ms->col    - mouse pixel col location of last press
  8565.  
  8566.         CAUTIONS and ADDITIONAL NOTES
  8567.  
  8568.              The mouse device driver is a pretty smart critter.  It keeps 
  8569.              track of a number of things, one of them being the number of 
  8570.              times a particular button has been pressed or released since 
  8571.              the last time someone has asked about it.  This function 
  8572.              returns pressed button information about a specific button 
  8573.              (MO_LEFT or MO_RIGHT), and it also returns the real time 
  8574.              button status in the same format as mo_pos().  
  8575.  
  8576.              The ms->row and ms->column locations in the mouse control 
  8577.              block are from the last press of the specified button.
  8578.  
  8579.              This function, like mo_pos, provides limited value for most 
  8580.              applications programs.  A better choice is mo_rbinfo 
  8581.              (released button information and status), since the mouse 
  8582.              device driver waits for the user to RELEASE the specified 
  8583.              button before it updates the internal counters.
  8584.  
  8585.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  8586.  
  8587.              Calling mo_pbinfo clears the mouse's pressed button history 
  8588.              counters.
  8589.  
  8590.              Also see "mo_press", "mo_release", "mo_rbinfo"
  8591.  
  8592.  
  8593.  
  8594.  
  8595.                                                            Page: 140
  8596.                                                      The Window BOSS
  8597.  
  8598.  
  8599.  
  8600.         10.78. mo_rbinfo -- get released mouse button status
  8601.  
  8602.              mo_rbinfo(ms,button)
  8603.              MOUSEPTR ms;
  8604.              int button;
  8605.  
  8606.                   ms     -  mouse handle
  8607.                   button -  button of interest (MO_LEFT or MO_RIGHT)
  8608.  
  8609.              Low level interface function.
  8610.  
  8611.         RETURNS
  8612.  
  8613.              Nothing. 
  8614.  
  8615.              Updates - Members of the mouse control block:
  8616.  
  8617.                ms->bstat  - bit 0 set if left has been released 
  8618.                             bit 1 set if right button has been released
  8619.                             bit 2 set if center button "   "    "
  8620.                ms->nclick - number of times the requseted button has 
  8621.                             been pressed and released since last call.
  8622.                ms->row    - mouse pixel row location of last release
  8623.                ms->col    - mouse pixel col location of last release 
  8624.  
  8625.         CAUTIONS and ADDITIONAL NOTES
  8626.  
  8627.              The mouse device driver is a pretty smart critter.  It keeps 
  8628.              track of a number of things, one of them being the number of 
  8629.              times a particular button has been pressed or released since 
  8630.              the last time someone has asked about it.  This function 
  8631.              returns released button information about a specific button 
  8632.              (MO_LEFT or MO_RIGHT), and it also returns the real time 
  8633.              button status in the same format as mo_pos().  
  8634.  
  8635.              The ms->row and ms->column locations in the mouse control 
  8636.              block are from the last button release  of the specified 
  8637.              button.
  8638.  
  8639.              The mouse device driver waits for the user to RELEASE the 
  8640.              specified button before it updates the internal counters.
  8641.  
  8642.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  8643.  
  8644.              Calling mo_rbinfo clears the mouse's pressed button history 
  8645.              counters.
  8646.  
  8647.              Also see "mo_release", "mo_press", "mo_pbinfo"
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.                                                            Page: 141
  8657.                                                      The Window BOSS
  8658.  
  8659.  
  8660.  
  8661.         10.79. mo_clim -- set mouse min/max pixel column limits
  8662.  
  8663.         USAGE
  8664.  
  8665.              mo_clim(ms,min,max)
  8666.              MOUSEPTR ms;
  8667.              int min, mix;
  8668.  
  8669.                   ms   - mouse handle
  8670.                   min  - column minimum in pixels (0 to 639)
  8671.                   max  - column maximum in pixels (0 to 639)
  8672.  
  8673.              mo_clim and mo_rlim limit the operational area of the mouse.  
  8674.              Together they define the mouse's hot area, or if you prefer, 
  8675.              they establish a fence/cage around the mouse. 
  8676.  
  8677.              Low level interface function.
  8678.  
  8679.         RETURNS
  8680.  
  8681.              Nothing.
  8682.  
  8683.         CAUTIONS and ADDITIONAL NOTES
  8684.  
  8685.              min and max are not range checked, 0 is on the left.
  8686.  
  8687.              Also see "mo_reigon"
  8688.  
  8689.         10.80. mo_rlim -- set mouse min/max pixel row limits
  8690.  
  8691.         USAGE
  8692.  
  8693.              mo_clim(ms,min,max)
  8694.              MOUSEPTR ms;
  8695.              int min, mix;
  8696.  
  8697.                   ms   - mouse handle
  8698.                   min  - row minimum in pixels (0 to 199)
  8699.                   max  - row maximum in pixels (0 to 199)
  8700.  
  8701.              mo_clim and mo_rlim limit the operational area of the mouse.  
  8702.              Together they define the mouse's hot area, or if you prefer, 
  8703.              they establish a fence/cage around the mouse. 
  8704.  
  8705.              Low level interface function.
  8706.  
  8707.         RETURNS
  8708.  
  8709.              Nothing.
  8710.  
  8711.         CAUTIONS and ADDITIONAL NOTES
  8712.  
  8713.              min and max are not range checked, 0 is at the top.
  8714.  
  8715.  
  8716.  
  8717.                                                            Page: 142
  8718.                                                      The Window BOSS
  8719.  
  8720.  
  8721.  
  8722.         10.81. mo_sgcursor -- set mouse graphics cursor
  8723.  
  8724.         USAGE
  8725.  
  8726.              mo_sgcursor(ms, hhot, vhot, seg, off)
  8727.              MOUSEPTR ms;
  8728.              int hhot, vhot;
  8729.              unsigned int seg, off;
  8730.  
  8731.                   ms         - mouse handle
  8732.                   hhot, vhot - X & Y relative coordinates of hot spot
  8733.                   seg, off   - segment and offset of mask set
  8734.  
  8735.              Low level interface function.
  8736.  
  8737.         RETURNS
  8738.  
  8739.              Nothing.
  8740.  
  8741.         CAUTIONS and ADDITIONAL NOTES
  8742.  
  8743.              This is an unsupported function that is useful in graphics 
  8744.              mode only.  
  8745.  
  8746.              This function is not to be used in conjunction with The 
  8747.              Window BOSS or Data Clerk.
  8748.  
  8749.              Refer to the Microsoft and/or Logitech API manuals for a 
  8750.              complete description of mouse function 9.
  8751.  
  8752.              Use "mo_scursor" or "mo_setptr" to set the mouse cursor.
  8753.  
  8754.  
  8755.  
  8756.  
  8757.  
  8758.  
  8759.  
  8760.  
  8761.  
  8762.  
  8763.  
  8764.  
  8765.  
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.                                                            Page: 143
  8779.                                                      The Window BOSS
  8780.  
  8781.  
  8782.  
  8783.         10.82. mo_scursor -- set mouse cursor
  8784.  
  8785.         USAGE
  8786.  
  8787.              mo_scursor(ms, type, start, stop)
  8788.              MOUSEPTR ms;
  8789.              int type, start, stop;
  8790.  
  8791.                   ms    - mouse pointer
  8792.                   type  - cursor type: 
  8793.                             MO_HDW for hardware
  8794.                             MO_SFT for software
  8795.                   start - start scan line
  8796.                   stop  - stop scan line
  8797.  
  8798.              When using a mouse, you can choose between two types of text 
  8799.              cursors, which are hardware or software.  The hardware 
  8800.              (MO_HDW) cursor puts the video adapters text cursor under 
  8801.              control of the mouse.  This results in a single cursor 
  8802.              appearing on the screen for both the mouse and text.  The 
  8803.              software cursor (MO_SFT) allows two cursors to appear on the 
  8804.              screen, the normal text cursor and a mouse cursor that can 
  8805.              take on a user defined shape and attribute.  The software 
  8806.              cursor is the default and is a simple full-cell inverse 
  8807.              video cursor.
  8808.  
  8809.              Using the hardware cursor type MO_HDW:
  8810.  
  8811.                   start - start scan line (usually 0)
  8812.                   stop  - stop scan line:
  8813.                             monochrome max = 12
  8814.                             non mon    max =  7
  8815.  
  8816.              Using the software cursor type MO_SFT:
  8817.  
  8818.                Option 1 (user defined):
  8819.                   
  8820.                   start - 0x00 
  8821.                   stop  - display attributes in upper 8 bits.
  8822.                           ASCII character to be used as cursor in lower 8 
  8823.                           bits.
  8824.  
  8825.                   For example, to set the software cursor to a white 
  8826.                   happy face on a black background:
  8827.  
  8828.                        mo_scursor(ms, MO_SFT, 0x00, 0x0703);     
  8829.  
  8830.  
  8831.                                                      continued...    
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.                                                            Page: 144
  8840.                                                      The Window BOSS
  8841.  
  8842.  
  8843.  
  8844.         mo_scursor - continued.
  8845.  
  8846.  
  8847.  
  8848.                Option 2 (see through rectangle):
  8849.  
  8850.                   start - 0x77ff
  8851.                   stop  - 0x00
  8852.  
  8853.                   For example, to set the software cursor to a see 
  8854.                   through block:
  8855.  
  8856.                        mo_scursor(ms, MO_SOFT, 0x77ff, 7700);     
  8857.  
  8858.              Low level interface function.
  8859.  
  8860.         RETURNS
  8861.  
  8862.              Nothing.
  8863.  
  8864.         CAUTIONS and ADDITIONAL NOTES
  8865.  
  8866.              See also "mo_setptr".
  8867.  
  8868.  
  8869.  
  8870.  
  8871.  
  8872.  
  8873.  
  8874.  
  8875.  
  8876.  
  8877.  
  8878.  
  8879.  
  8880.  
  8881.  
  8882.  
  8883.  
  8884.  
  8885.  
  8886.  
  8887.  
  8888.  
  8889.  
  8890.  
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.                                                            Page: 145
  8901.                                                      The Window BOSS
  8902.  
  8903.  
  8904.  
  8905.         10.83. mo_motion  -- get mouse motion counters
  8906.  
  8907.         USAGE
  8908.  
  8909.              mo_motion(ms)
  8910.              MOUSEPTR ms;
  8911.  
  8912.                   ms - mouse handle
  8913.  
  8914.              Low level interface function.
  8915.  
  8916.         RETURNS
  8917.  
  8918.              Nothing.
  8919.  
  8920.              Updates - Members of the mouse control block:
  8921.  
  8922.                ms->vmove - vertical move counter since last call
  8923.                ms->hmove - horizontal move counter since last call
  8924.  
  8925.         CAUTIONS and ADDITIONAL NOTES
  8926.  
  8927.              The mouse motion counters are reset after each call.
  8928.  
  8929.  
  8930.  
  8931.  
  8932.  
  8933.  
  8934.  
  8935.  
  8936.  
  8937.  
  8938.  
  8939.  
  8940.  
  8941.  
  8942.  
  8943.  
  8944.  
  8945.  
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.                                                            Page: 146
  8962.                                                      The Window BOSS
  8963.  
  8964.  
  8965.  
  8966.         10.84. mo_task -- define mouse event handler
  8967.  
  8968.         USAGE
  8969.  
  8970.              mo_task(m, mask, seg, off)
  8971.              WINDOWPTR m;
  8972.              unsigned int mask, seg, off;
  8973.  
  8974.                   m    - mouse handle
  8975.                   mask - event mask
  8976.                             BIT            EVENT
  8977.                              0             Mouse cursor moved
  8978.                              1             Left Button pressed
  8979.                              2             Left button released
  8980.                              3             Right button pressed
  8981.                              4             Right button released
  8982.                              5             Middle button pressed
  8983.                              6             Middle button released
  8984.                   seg  - segment address of handler routine
  8985.                   off  - offset portion of handler routine address
  8986.  
  8987.              This function, if properly implemented, can keep your code 
  8988.              free of frequent mouse checks.  The basic notion is to 
  8989.              "attach" a function in your program to the mouse device 
  8990.              driver.  This function would be invoked whenever any one of 
  8991.              the above events took place.  Your function would then 
  8992.              execute at interrupt level.  There are a few shortcomings, 
  8993.              however, your function can not perform any I/O, make any 
  8994.              calls to DOS or call any of the ROM BIOS routines.  What can 
  8995.              it do?  Actually not much other than record the fact than an 
  8996.              event took place and dismiss the interupt.  Your program can 
  8997.              then process the event at its convenience.  
  8998.  
  8999.              The difficulty with using this function is due to the fact 
  9000.              that your function MUST look like an interupt service 
  9001.              routine in both the way it beings and finishes executing.  
  9002.              This form of code generation is something most "C" compilers 
  9003.              are not very good at, and as a result most of these handler 
  9004.              routines have to be written in assembly language.  This 
  9005.              function is provided as a convenience to those who are 
  9006.              familar with writing these types of programs - it is not 
  9007.              supported by Star Guidance.
  9008.  
  9009.         RETURNS
  9010.  
  9011.              Nothing.
  9012.  
  9013.         CAUTIONS and ADDITIONAL NOTES
  9014.  
  9015.              This is an unsupported function.
  9016.  
  9017.              Refer to the Microsoft and/or Logitech API manuals for a 
  9018.              complete description of mouse function 12.
  9019.  
  9020.  
  9021.  
  9022.                                                            Page: 147
  9023.                                                      The Window BOSS
  9024.  
  9025.  
  9026.  
  9027.         10.85. mo_lpon -- mouse light pen emulation on
  9028.         10.86. mo_lpoff -- mouse light pen emulation off
  9029.  
  9030.         USAGE
  9031.  
  9032.              mo_lpon(ms)
  9033.              MOUSEPTR ms;
  9034.  
  9035.              mo_lpoff(ms)
  9036.              MOUSEPTR ms;
  9037.  
  9038.                   ms - mouse handle
  9039.  
  9040.              These functions allow software that exepects to find a light 
  9041.              pen to respond (or not to respond) to the mouse as if it 
  9042.              were a light pen.  By default, light pen emluation is 
  9043.              enabled - mo_reset() automatically turns on light pen 
  9044.              emulation.
  9045.  
  9046.              Low level and applications level interface function.
  9047.  
  9048.         RETURNS
  9049.  
  9050.              Nothing.
  9051.  
  9052.         CAUTIONS and ADDITIONAL NOTES
  9053.  
  9054.              None.
  9055.  
  9056.  
  9057.         10.87. mo_ratio -- set motion to pixel ratio
  9058.  
  9059.         USAGE
  9060.  
  9061.              mo_ratio(ms)
  9062.              MOUSEPTR ms;
  9063.  
  9064.                   ms - mouse handle
  9065.  
  9066.              Set the motion to pixel ratio (graphics mode).
  9067.  
  9068.              Low level interface function.
  9069.  
  9070.         RETURNS
  9071.  
  9072.              Nothing.
  9073.  
  9074.         CAUTIONS and ADDITIONAL NOTES
  9075.  
  9076.              This is an unsupported function.
  9077.  
  9078.              Refer to the Microsoft and/or Logitech API manuals for a 
  9079.              complete description of mouse function 15.
  9080.  
  9081.  
  9082.  
  9083.                                                            Page: 148
  9084.                                                      The Window BOSS
  9085.  
  9086.  
  9087.  
  9088.         10.88. mo_rcpos -- return current position of mouse
  9089.  
  9090.         USAGE
  9091.  
  9092.              mo_rcpos(ms, status, row, col)
  9093.              MOUSEPTR ms;
  9094.              int *status, *row, *col;
  9095.  
  9096.                   ms      - mouse handle
  9097.                   *status - pointer to int to receive mouse status
  9098.                               bit 0 set if left button is CURRENTLY down 
  9099.                               bit 1 set if right button is CURRENTLY down
  9100.                               bit 2 set if center button is CURRENTLY down
  9101.                   *row    - pointer to int to receive position
  9102.                             of mouse row (0-25)
  9103.                   *col    - pointer to int to receive position
  9104.                             of mouse column (0-79)
  9105.  
  9106.              Applications level interface function.
  9107.  
  9108.         RETURNS
  9109.  
  9110.              Nothing.
  9111.  
  9112.              Updates - Members of the mouse control block:
  9113.  
  9114.                ms->bstat - bit 0 set if left button is CURRENTLY down 
  9115.                            bit 1 set if right button is CURRENTLY down
  9116.                            bit 2 set if center button is CURRENTLY down
  9117.                                       
  9118.                ms->row   - mouse pixel row location 
  9119.                ms->col   - mouse pixel col location
  9120.  
  9121.  
  9122.                                                      continued....
  9123.  
  9124.  
  9125.  
  9126.  
  9127.  
  9128.  
  9129.  
  9130.  
  9131.  
  9132.  
  9133.  
  9134.  
  9135.  
  9136.  
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.  
  9143.  
  9144.                                                            Page: 149
  9145.                                                      The Window BOSS
  9146.  
  9147.  
  9148.  
  9149.         mo_rcpos - continued.
  9150.  
  9151.  
  9152.  
  9153.              CAUTIONS and ADDITIONAL NOTES
  9154.  
  9155.              Example:
  9156.  
  9157.                   #include "winboss.h"
  9158.                   main()
  9159.                   {
  9160.                   MOUSEPTR ms;
  9161.                   int st, row, col;
  9162.                        ms=mo_reset();           /* init mouse */
  9163.                        if(ms) {
  9164.                                                 /* fetch status */
  9165.                             mo_rcpos(ms, &st, &row, &col);
  9166.                             mo_show(ms);        /* show mouse */
  9167.                             v_getch();          /* wait for key hit */
  9168.                             mo_hide(ms);        /* hide mouse */
  9169.                             exit(0);            /* finito */
  9170.                        }
  9171.                        else {
  9172.                             ... no mouse
  9173.                        }
  9174.                   }
  9175.                   /* End */
  9176.  
  9177.              Note the use of pointers.
  9178.  
  9179.              All information is reported in real time.  If the mouse is 
  9180.              in the process of being moved the information returned may 
  9181.              not be indicative of the final destination. 
  9182.  
  9183.              Making infrequent calls to this routine can cause your 
  9184.              program to miss button clicks. 
  9185.  
  9186.              The recommended way to obtain accurate information is by 
  9187.              using mo_wait in conjunction with mo_rcpos.
  9188.  
  9189.              See also mo_pos(), mo_wait()
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.                                                            Page: 150
  9206.                                                      The Window BOSS
  9207.  
  9208.  
  9209.  
  9210.         10.89. mo_locate -- locate (position) mouse cursor
  9211.  
  9212.         USAGE
  9213.  
  9214.              mo_locate(ms, row, col)
  9215.              MOUSEPTR ms;
  9216.              int row, col;
  9217.  
  9218.                   ms   - mouse handle
  9219.                   row  - destination row (0-24)
  9220.                   col  - destination column (0-79)
  9221.  
  9222.              mo_locate positions the mouse to the row and column 
  9223.              specified.
  9224.  
  9225.              Applications level interface function.
  9226.  
  9227.         RETURNS
  9228.  
  9229.              Nothing.
  9230.  
  9231.         CAUTIONS and ADDITIONAL NOTES
  9232.  
  9233.              Example:
  9234.  
  9235.                   #include "winboss.h"
  9236.                   main()
  9237.                   {
  9238.                   MOUSEPTR ms;
  9239.                   int st, row, col;
  9240.                        ms=mo_reset();           /* init mouse */
  9241.                        if(ms) {
  9242.                                                 /* fetch status */
  9243.                             mo_rcpos(ms, &st, &row, &col);
  9244.                             if(row != 0)        /* home the mouse ?? */
  9245.                               mo_locate(ms, 0, 0);
  9246.                             mo_show(ms);        /* show mouse */
  9247.                             v_getch();          /* wait for key hit */
  9248.                             mo_hide(ms);        /* hide mouse */
  9249.                             exit(0);            /* finito */
  9250.                        }
  9251.                        else {
  9252.                             ... no mouse
  9253.                        }
  9254.                   }
  9255.                   /* End */
  9256.  
  9257.              Values are not range checked.
  9258.  
  9259.  
  9260.  
  9261.  
  9262.  
  9263.  
  9264.  
  9265.  
  9266.                                                            Page: 151
  9267.                                                      The Window BOSS
  9268.  
  9269.  
  9270.  
  9271.         10.90. mo_press -- get mouse button press status
  9272.  
  9273.         USAGE
  9274.  
  9275.              mo_press(ms, button, status, nclick, row, col)
  9276.              MOUSEPTR ms;
  9277.              int button;
  9278.              int *status, *nclick, *row, *col;
  9279.  
  9280.                   ms      - mouse handle
  9281.                   button  - button of interest (MO_LEFT or MO_RIGHT)
  9282.                   status  - pointer to int to receive status information.
  9283.                               bit 0 set if left button is CURRENTLY down 
  9284.                               bit 1 set if right button is CURRENTLY down
  9285.                               bit 2 set if center button is CURRENTLY down
  9286.                   nclick  - pointer to int to receive number of times the 
  9287.                             mouse button specified by button has been 
  9288.                             pressed since last call. Zero indicates the 
  9289.                             button has not been pressed since the last 
  9290.                             call.
  9291.                   row     - pointer to int to receive row (0-24) of last 
  9292.                             button press.
  9293.                   col     - pointer to int to receive column (0-79) of 
  9294.                             last button press.
  9295.  
  9296.              Applications level interface function.
  9297.  
  9298.         RETURNS
  9299.  
  9300.              Nothing.
  9301.  
  9302.              Updates - Members of the mouse control block:
  9303.  
  9304.                ms->bstat  - bit 0 set if left button is CURRENTLY down 
  9305.                             bit 1 set if right button is CURRENTLY down
  9306.                             bit 2 set if center button is CURRENTLY down
  9307.                ms->nclick - number of times the requested button has been 
  9308.                             pressed since last call.
  9309.                ms->row    - mouse pixel row location of last press
  9310.                ms->col    - mouse pixel col location of last press
  9311.  
  9312.  
  9313.                                                      continued....
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.  
  9320.  
  9321.  
  9322.  
  9323.  
  9324.  
  9325.  
  9326.  
  9327.                                                            Page: 152
  9328.                                                      The Window BOSS
  9329.  
  9330.  
  9331.  
  9332.         mo_press - continued.
  9333.  
  9334.  
  9335.  
  9336.         CAUTIONS and ADDITIONAL NOTES
  9337.  
  9338.              Example:
  9339.  
  9340.                   #include "winboss.h"
  9341.                   main()
  9342.                   {
  9343.                   MOUSEPTR ms;
  9344.                   int st, row, col;
  9345.                        ms=mo_reset();           /* init mouse */
  9346.                        if(ms) {
  9347.                                                 /* fetch status */
  9348.                           mo_rcpos(ms, &st, &row, &col);
  9349.                           if(row != 0)          /* home the mouse ?? */
  9350.                             mo_locate(ms, 0, 0);
  9351.                           mo_show(ms);          /* show mouse */
  9352.                           do {                  /* loop till press */
  9353.                             mo_wait(ms);        /* let mouse settle */
  9354.                             mo_press(ms, MO_LEFT, &st, &nc, &row, &col);
  9355.                           } while(!nc); 
  9356.                           mo_hide(ms);          /* hide mouse */
  9357.                           exit(0);              /* finito */
  9358.                        }
  9359.                        else {
  9360.                             ... no mouse
  9361.                        }
  9362.                   }
  9363.                   /* End */
  9364.  
  9365.              Note use of POINTERS.
  9366.  
  9367.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  9368.  
  9369.              Calling mo_press clears the mouse's pressed button history 
  9370.              counters.
  9371.  
  9372.              Since mo_release waits for the mouse button to be released 
  9373.              before updating the device drivers internal tables, it is a 
  9374.              better choice for most applications.
  9375.  
  9376.              Also see "mo_pbinfo"
  9377.  
  9378.  
  9379.  
  9380.  
  9381.  
  9382.  
  9383.  
  9384.  
  9385.  
  9386.  
  9387.  
  9388.                                                            Page: 153
  9389.                                                      The Window BOSS
  9390.  
  9391.  
  9392.  
  9393.         10.91. mo_release -- get mouse button release status
  9394.  
  9395.         USAGE
  9396.  
  9397.              mo_release(ms, button, status, nclick, row, col)
  9398.              MOUSEPTR ms;
  9399.              int button;
  9400.              int *status, *nclick, *row, *col;
  9401.  
  9402.                   ms      - mouse handle
  9403.                   button  - button of interest (MO_LEFT or MO_RIGHT)
  9404.                   status  - pointer to int to receive status information.
  9405.                               bit 0 set if left button has been pressed 
  9406.                               and released.
  9407.                               bit 1 set if right button has been pressed 
  9408.                               and released.
  9409.                               bit 2 set if center button has been pressed 
  9410.                               and released.
  9411.                   nclick  - pointer to int to receive number of times the 
  9412.                             mouse button specified by button has been 
  9413.                             pressed and released since last call. Zero 
  9414.                             indicates the button has not been released
  9415.                             since the last call.
  9416.                   row     - pointer to int to receive row (0-24) of last 
  9417.                             button release.
  9418.                   col     - pointer to int to receive column (0-79) of 
  9419.                             last button release.
  9420.  
  9421.              Applications level interface function.
  9422.  
  9423.         RETURNS
  9424.  
  9425.              Nothing. 
  9426.  
  9427.              Updates - Members of the mouse control block:
  9428.  
  9429.                ms->bstat  - bit 0 set if left has been released 
  9430.                             bit 1 set if right button has been released
  9431.                             bit 2 set if center button "   "    "
  9432.                ms->nclick - number of times the requested button has been 
  9433.                             pressed and released since last call.
  9434.                ms->row    - mouse pixel row location of last release
  9435.                ms->col    - mouse pixel col location of last release 
  9436.  
  9437.  
  9438.                                                 continued....
  9439.  
  9440.  
  9441.  
  9442.  
  9443.  
  9444.  
  9445.  
  9446.  
  9447.  
  9448.  
  9449.                                                            Page: 154
  9450.                                                      The Window BOSS
  9451.  
  9452.  
  9453.  
  9454.         mo_release - continued.
  9455.  
  9456.  
  9457.  
  9458.         CAUTIONS and ADDITIONAL NOTES
  9459.  
  9460.              Example:
  9461.  
  9462.                   #include "winboss.h"
  9463.                   main()
  9464.                   {
  9465.                   MOUSEPTR ms;
  9466.                   int st, nc, row, col;
  9467.                        ms=mo_reset();           /* init mouse */
  9468.                        if(ms) {
  9469.                                                 /* fetch status */
  9470.                           mo_rcpos(ms, &st, &row, &col);
  9471.                           if(row != 0)          /* home the mouse ?? */
  9472.                             mo_locate(ms, 0, 0);
  9473.                           mo_show(ms);          /* show mouse */
  9474.                           do {                  /* loop till release */
  9475.                             mo_wait(ms);        /* let mouse settle */
  9476.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9477.                           } while(!nc); 
  9478.                           mo_hide(ms);          /* hide mouse */
  9479.                           exit(0);              /* finito */
  9480.                        }
  9481.                        else {
  9482.                             ... no mouse
  9483.                        }
  9484.                   }
  9485.                   /* End */
  9486.  
  9487.              Note use of POINTERS.
  9488.  
  9489.              The mouse device driver waits for the user to RELEASE the 
  9490.              specified button before it updates the internal counters.
  9491.  
  9492.              MO_LEFT and MO_RIGHT are defined in "winboss.h"
  9493.  
  9494.              Calling mo_release clears the mouse's pressed button history 
  9495.              counters.
  9496.  
  9497.              Also see "mo_rbinfo", "mo_pbinfo", "mo_press"
  9498.  
  9499.  
  9500.  
  9501.  
  9502.  
  9503.  
  9504.  
  9505.  
  9506.  
  9507.  
  9508.  
  9509.  
  9510.                                                            Page: 155
  9511.                                                      The Window BOSS
  9512.  
  9513.  
  9514.  
  9515.         10.92. mo_reigon -- set mouse region
  9516.  
  9517.         USAGE
  9518.  
  9519.              mo_reigon(ms, row, col, width, height)
  9520.              MOUSEPTR ms;
  9521.              int row, col, width, height;
  9522.  
  9523.                   ms     - mouse pointer
  9524.                   row    - upper left hand corner row
  9525.                   col    - upper left hand corner column
  9526.                   width  - width of region (# of columns 1 to 80)
  9527.                   height - height of region (# of rows 1 to 25)
  9528.  
  9529.              mo_reigon defines the boundaries of where the mouse may 
  9530.              move.  Establishes a fence/cage around the mouse.
  9531.  
  9532.         RETURNS
  9533.  
  9534.              Nothing.
  9535.  
  9536.         CAUTIONS and ADDITIONAL NOTES
  9537.  
  9538.              Example:
  9539.  
  9540.                   #include "winboss.h"
  9541.                   main()
  9542.                   {
  9543.                   MOUSEPTR ms;
  9544.                   int st, nc, row, col;
  9545.                        ms=mo_reset();           /* init mouse */
  9546.                        if(ms) {
  9547.                                                 /* fetch status */
  9548.                           mo_rcpos(ms, &st, &row, &col);
  9549.                           if(row != 0)          /* home the mouse ?? */
  9550.                             mo_locate(ms, 0, 0);
  9551.                           mo_reigon(ms, 0, 0, 40, 12); /* 40x12 */
  9552.                           mo_show(ms);          /* show mouse */
  9553.                           do {                  /* loop till release */
  9554.                             mo_wait(ms);        /* let mouse settle */
  9555.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9556.                           } while(!nc); 
  9557.                           mo_hide(ms);          /* hide mouse */
  9558.                           exit(0);              /* finito */
  9559.                        }
  9560.                        else {
  9561.                             ... no mouse
  9562.                        }
  9563.                   }
  9564.                   /* End */
  9565.  
  9566.  
  9567.  
  9568.  
  9569.  
  9570.  
  9571.                                                            Page: 156
  9572.                                                      The Window BOSS
  9573.  
  9574.  
  9575.  
  9576.         10.93. mo_setptr -- set mouse pointer and attributes
  9577.  
  9578.         USAGE
  9579.  
  9580.              mo_setptr(ms, tchar, atrib)
  9581.              MOUSEPTR ms;
  9582.              unsigned int tchar, atrib;
  9583.  
  9584.                   ms    - mouse handle
  9585.                   tchar - character to be used as the mouse cursor, valid 
  9586.                           range is 0 to 255 although a value of 0 makes 
  9587.                           no sense at all!
  9588.                   atrib - attribute to be used.  The attribute byte 
  9589.                           contains the background specific data in the 
  9590.                           upper 4 bits and the foreground specific data 
  9591.                           in the lower 4 bits.  Color and bit definitions 
  9592.                           can be found in winboss.h. You can use a 
  9593.                           statement as follows to set atrib:
  9594.  
  9595.                             atrib = (bground << 4 | fground);
  9596.  
  9597.         RETURNS
  9598.  
  9599.              Nothing.
  9600.  
  9601.         CAUTIONS and ADDITIONAL NOTES
  9602.  
  9603.              To set the mouse cursor to a white happy face on a backgound 
  9604.              use the following:
  9605.  
  9606.                   atrib = BLACK<<4 | WHITE;
  9607.                   mo_setptr(ms, 0x03, atrib);
  9608.  
  9609.              Attributes are defined in winboss.h.
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.  
  9617.  
  9618.  
  9619.  
  9620.  
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.  
  9629.  
  9630.  
  9631.  
  9632.                                                            Page: 157
  9633.                                                      The Window BOSS
  9634.  
  9635.  
  9636.  
  9637.         10.94. mo_wait -- wait for mouse to settle
  9638.  
  9639.         USAGE
  9640.  
  9641.              mo_wait(ms)
  9642.              MOUSEPTR ms;
  9643.  
  9644.                   ms - mouse handle.
  9645.  
  9646.              Calling mo_wait causes your progam to pause until the mouse 
  9647.              has settled - completely stopped and with its buttons up and 
  9648.              no activity in progress.  
  9649.  
  9650.         RETURNS
  9651.  
  9652.              Nothing.
  9653.  
  9654.         CAUTIONS and ADDITIONAL NOTES
  9655.  
  9656.              Example:
  9657.  
  9658.                   #include "winboss.h"
  9659.                   main()
  9660.                   {
  9661.                   MOUSEPTR ms;
  9662.                   int st, nc, row, col;
  9663.                   unsigned atrib;
  9664.                        ms=mo_reset();           /* init mouse */
  9665.                        if(ms) {                 /* fetch status */
  9666.                           mo_rcpos(ms, &st, &row, &col);
  9667.                           if(row != 0)          /* home the mouse ?? */
  9668.                             mo_locate(ms, 0, 0);
  9669.                           mo_reigon(ms, 0, 0, 40, 12); /* 40x12 */
  9670.                           atrib = BLACK<<4 | WHITE;
  9671.                           mo_setptr(ms, 0x03, atrib);
  9672.                           mo_show(ms);          /* show mouse */
  9673.                           do {                  /* loop till release */
  9674.                             mo_wait(ms);        /* let mouse settle */
  9675.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9676.                           } while(!nc); 
  9677.                           mo_hide(ms);          /* hide mouse */
  9678.                           exit(0);              /* finito */
  9679.                        }
  9680.                        else {
  9681.                             ... no mouse
  9682.                        }
  9683.                   }
  9684.                   /* End */
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.                                                            Page: 158
  9694.                                                      The Window BOSS
  9695.  
  9696.  
  9697.  
  9698.         10.95. mo_nbutt -- get mouse button count
  9699.  
  9700.         USAGE
  9701.  
  9702.              (int) mo_nbutt(ms)
  9703.              MOUSEPTR ms;
  9704.  
  9705.                   ms - mouse handle
  9706.  
  9707.         RETURNS
  9708.  
  9709.              Number of buttons on mouse.
  9710.  
  9711.         CAUTIONS and ADDITIONAL NOTES
  9712.  
  9713.              None.
  9714.  
  9715.  
  9716.  
  9717.  
  9718.  
  9719.  
  9720.  
  9721.  
  9722.  
  9723.  
  9724.  
  9725.  
  9726.  
  9727.  
  9728.  
  9729.  
  9730.  
  9731.  
  9732.  
  9733.  
  9734.  
  9735.  
  9736.  
  9737.  
  9738.  
  9739.  
  9740.  
  9741.  
  9742.  
  9743.  
  9744.  
  9745.  
  9746.  
  9747.  
  9748.  
  9749.  
  9750.  
  9751.  
  9752.  
  9753.  
  9754.                                                            Page: 159
  9755.                                                      The Window BOSS
  9756.  
  9757.  
  9758.  
  9759.         10.96. _getca -- get character and attribute
  9760.  
  9761.         USAGE
  9762.  
  9763.           unsigned int _getca(page, row, col)
  9764.           int page, row, col;
  9765.  
  9766.  
  9767.                 page - video page #
  9768.                 row -  row value (0-24)
  9769.                 col -  column value (0-79)
  9770.  
  9771.           _getca fetches the character and attribute at the screen 
  9772.           coordinates defined by row and column.  _getca is a general 
  9773.           purpose routine and can be used outside of the window 
  9774.           environment.
  9775.  
  9776.         RETURNS
  9777.  
  9778.           The character and attribute as an unsigned int.  The attribute 
  9779.           is in the upper byte, the character is in the lower byte.
  9780.  
  9781.         CAUTIONS and ADDITIONAL NOTES
  9782.  
  9783.           None.
  9784.  
  9785.  
  9786.  
  9787.         10.97. _putca -- put character and attribute 
  9788.  
  9789.         USAGE
  9790.  
  9791.           _putca(page, atch, row, col);
  9792.           int page, row, col;
  9793.           unsigned atch;
  9794.  
  9795.                 page - video page #
  9796.                 atch - attribute and character
  9797.                          attribute in high order byte
  9798.                          character in low order byte
  9799.                 row -  row position for character (0-24)
  9800.                 col -  column position for character (0-79)
  9801.  
  9802.           _putch is a general purpose routine that can be used outside of 
  9803.           the window environment.
  9804.  
  9805.         RETURNS
  9806.  
  9807.           Nothing.
  9808.  
  9809.         CAUTIONS and ADDITIONAL NOTES
  9810.  
  9811.           None.
  9812.  
  9813.  
  9814.  
  9815.                                                            Page: 160
  9816.                                                      The Window BOSS
  9817.  
  9818.  
  9819.  
  9820.         10.98. _vidblt -- video block transfer
  9821.  
  9822.         USAGE
  9823.  
  9824.           _vidblt(sseg, soff, dseg, doff, n);
  9825.           unsigned sseg, soff, dseg, doff;
  9826.           int n;
  9827.  
  9828.                 sseg - source segment
  9829.                 soff - source offset
  9830.                 dseg - destination segment
  9831.                 doff - destination offset
  9832.                 n -    number of bytes to BLT
  9833.  
  9834.           _vidblt is similar to the lattice movedata() function except 
  9835.           that it waits for the video retrace signal before performing 
  9836.           the block transfer.
  9837.  
  9838.           _vidblt is a general purpose function that can be used outside 
  9839.           of the window environment.
  9840.  
  9841.         RETURNS
  9842.  
  9843.           Nothing
  9844.  
  9845.         CAUTIONS and ADDITIONAL NOTES
  9846.  
  9847.           For use in color systems only.
  9848.  
  9849.           _vidblt references wn_sbit.
  9850.  
  9851.  
  9852.  
  9853.         10.99. v_spage -- set active display page
  9854.  
  9855.         USAGE
  9856.  
  9857.           v_spage(page)
  9858.           int page;
  9859.  
  9860.                 page - video page to switch the display to
  9861.  
  9862.           v_spage is a general purpose routine that can be used outside 
  9863.           of the window environment.  
  9864.  
  9865.         RETURNS
  9866.  
  9867.           Nothing.
  9868.  
  9869.         CAUTIONS and ADDITIONAL NOTES
  9870.  
  9871.           Color card only.
  9872.  
  9873.  
  9874.  
  9875.  
  9876.                                                            Page: 161
  9877.                                                      The Window BOSS
  9878.  
  9879.  
  9880.  
  9881.         10.100. v_cls -- clear entire video screen 
  9882.  
  9883.         USAGE
  9884.  
  9885.           v_cls(atrib)
  9886.           int atrib;
  9887.  
  9888.                 atrib - attribute to be used 
  9889.  
  9890.           v_cls clears the entire video screen to the specified attribute 
  9891.           and places the cursor in the upper left hand corner of the 
  9892.           screen.
  9893.  
  9894.           v_cls is a general purpose routine that can be used outside of 
  9895.           the window environment.
  9896.  
  9897.           Attributes are defined in winboss.h.
  9898.  
  9899.         RETURNS
  9900.  
  9901.           Nothing.
  9902.  
  9903.         CAUTIONS and ADDITIONAL NOTES
  9904.  
  9905.           References Window BOSS globals defined in "winboss.ext".
  9906.  
  9907.  
  9908.  
  9909.         10.101. v_smode -- set video mode
  9910.  
  9911.         USAGE
  9912.  
  9913.           v_smode(mode)
  9914.           int mode;
  9915.  
  9916.                 mode - mode to set the display to
  9917.  
  9918.           v_smode is a general purpose routine which can be used outside 
  9919.           of the window environment.
  9920.  
  9921.           Modes are defined in winboss.h.
  9922.  
  9923.         RETURNS
  9924.  
  9925.           Nothing.
  9926.  
  9927.         CAUTIONS and ADDITIONAL NOTES
  9928.  
  9929.           None.
  9930.  
  9931.  
  9932.  
  9933.  
  9934.  
  9935.  
  9936.  
  9937.                                                            Page: 162
  9938.                                                      The Window BOSS
  9939.  
  9940.  
  9941.  
  9942.         10.102. v_wca -- write character and attribute
  9943.  
  9944.         USAGE
  9945.  
  9946.           v_wca(page, char, atrib, count);
  9947.           int page, char, atrib, count;
  9948.  
  9949.                 page -  video page #
  9950.                 char -  character to write
  9951.                 atrib - attribute to use
  9952.                 count - number of times to repeat
  9953.  
  9954.           v_wca writes the character defined by char count times starting 
  9955.           at the current cursor location.     
  9956.  
  9957.           v_wca is a general purpose routine that can be used outside of 
  9958.           the window environment. 
  9959.  
  9960.           Attributes are defined in winboss.h.
  9961.  
  9962.         RETURNS
  9963.  
  9964.           Nothing.
  9965.  
  9966.         CAUTIONS and ADDITIONAL NOTES
  9967.  
  9968.           None.
  9969.  
  9970.  
  9971.  
  9972.         10.103. v_wtty -- write character TTY mode
  9973.  
  9974.         USAGE
  9975.  
  9976.           v_wtty(char);
  9977.           int  char;
  9978.  
  9979.                 char -  character to write
  9980.  
  9981.         v_wtty writes the character defined by char at the current cursor 
  9982.         location.  
  9983.  
  9984.           v_wtty is a general purpose routine that can be used outside of 
  9985.           the window environment. 
  9986.  
  9987.         RETURNS
  9988.  
  9989.           Nothing.
  9990.  
  9991.         CAUTIONS and ADDITIONAL NOTES
  9992.  
  9993.           None.
  9994.  
  9995.  
  9996.  
  9997.  
  9998.                                                            Page: 163
  9999.                                                      The Window BOSS
  10000.  
  10001.  
  10002.  
  10003.         10.104. v_locate -- locate (position) cursor
  10004.  
  10005.         USAGE
  10006.  
  10007.           v_locate(page, row, col);
  10008.           int page, row, col;
  10009.  
  10010.                 page - video page #
  10011.                 row  - row to position to
  10012.                 col  - column to position to
  10013.           
  10014.           v_locate positions the cursor to the absolute coordinates 
  10015.           specified by row and col on the specified page.  The upper left 
  10016.           hand corner of the screen is (0,0).
  10017.  
  10018.           v_locate is a general purpose routine that can be used outside 
  10019.           of the window environment.
  10020.  
  10021.           Row and Col are range checked.  You CAN position the cursor 
  10022.           slightly (25,80) off the screen.
  10023.  
  10024.         RETURNS
  10025.  
  10026.           Nothing.
  10027.  
  10028.         CAUTIONS and ADDITIONAL NOTES
  10029.  
  10030.           References Window BOSS globals defined in "winboss.ext".
  10031.  
  10032.  
  10033.  
  10034.         10.105. v_hidec -- hide cursor
  10035.  
  10036.         USAGE
  10037.  
  10038.           v_hidec();
  10039.  
  10040.           The physical cursor is located off the screen.
  10041.  
  10042.           This function does not affect any virtual cursor coordinates, 
  10043.           it simply hides the physical cursor from view.
  10044.  
  10045.         RETURNS
  10046.  
  10047.           Nothing.
  10048.  
  10049.         CAUTIONS and ADDITIONAL NOTES
  10050.  
  10051.           References Window BOSS globals defined in "winboss.ext".
  10052.  
  10053.  
  10054.  
  10055.  
  10056.  
  10057.  
  10058.  
  10059.                                                            Page: 164
  10060.                                                      The Window BOSS
  10061.  
  10062.  
  10063.  
  10064.         10.106. v_sctype -- set cursor type (style)
  10065.         10.107. v_gctype -- get cursor type (style)
  10066.  
  10067.         USAGE
  10068.  
  10069.           v_sctype(type, start, end);
  10070.           int type, start, end;
  10071.  
  10072.                 type -  cursor style code 
  10073.                         (0=hidden, 1=normal, 2=slow, 3=fast)
  10074.                 start - start scan line
  10075.                 end -   end scan line
  10076.  
  10077.                   As an example, to set a slow flashing block style 
  10078.                   cursor invoke this function with type=1, start=6, and 
  10079.                   end=12 (color card).
  10080.  
  10081.                        v_sctype(1, 6, 12);
  10082.  
  10083.           v_gctype(page, start, end);
  10084.           int page, *start, *end;                    <- NOTE POINTERS
  10085.              
  10086.                 page -  always 0
  10087.                 start - start scan line
  10088.                 end -   end scan line
  10089.  
  10090.         RETURNS
  10091.  
  10092.           Nothing (v_sctype).
  10093.  
  10094.           Start and end scan line via pointers (v_gctype).
  10095.  
  10096.         CAUTIONS and ADDITIONAL NOTES
  10097.  
  10098.           None.
  10099.  
  10100.  
  10101.  
  10102.  
  10103.  
  10104.  
  10105.  
  10106.  
  10107.  
  10108.  
  10109.  
  10110.  
  10111.  
  10112.  
  10113.  
  10114.  
  10115.  
  10116.  
  10117.  
  10118.  
  10119.  
  10120.                                                            Page: 165
  10121.                                                      The Window BOSS
  10122.  
  10123.  
  10124.  
  10125.         10.108. v_sapu -- scroll active display page up
  10126.  
  10127.         USAGE
  10128.  
  10129.           v_sapu(nl, rul, cul, rlr, clr, atrib);
  10130.           int nl, rul, cul, rlr, clr, atrib;
  10131.  
  10132.                 nl  - number of lines to scroll
  10133.                 rul - row of upper left hand corner of scroll area
  10134.                 cul - column of upper left hand corner of scroll area
  10135.                 rlr - row of lower right corner of scroll area
  10136.                 clr - column of lower right corner of scroll area
  10137.                 atrib - attribute to be used for blanking
  10138.  
  10139.           A value of 0 for nl scrolls (blanks) the entire area.  To clear 
  10140.           the entire video screen use v_sapu(0, 0, 0, 24, 79, NORMAL).
  10141.  
  10142.           v_sapu is a general purpose routine that can be used outside of 
  10143.           the window environment.  
  10144.  
  10145.           Attributes are defined in winboss.h.
  10146.  
  10147.         RETURNS
  10148.  
  10149.           Nothing.
  10150.  
  10151.         CAUTIONS and ADDITIONAL NOTES
  10152.  
  10153.           None.
  10154.  
  10155.  
  10156.  
  10157.  
  10158.  
  10159.  
  10160.  
  10161.  
  10162.  
  10163.  
  10164.  
  10165.  
  10166.  
  10167.  
  10168.  
  10169.  
  10170.  
  10171.  
  10172.  
  10173.  
  10174.  
  10175.  
  10176.  
  10177.  
  10178.  
  10179.  
  10180.  
  10181.                                                            Page: 166
  10182.                                                      The Window BOSS
  10183.  
  10184.  
  10185.  
  10186.         10.109. v_sapd -- scroll active display page down
  10187.  
  10188.         USAGE
  10189.  
  10190.           v_sapd(nl, rul, cul, rlr, clr, atrib);
  10191.           int nl, rul, cul, rlr, clr, atrib;
  10192.  
  10193.                 nl  - number of lines to scroll
  10194.                 rul - row of upper left hand corner of scroll area
  10195.                 cul - column of upper left hand corner of scroll area
  10196.                 rlr - row of lower right corner of scroll area
  10197.                 clr - column of lower right corner of scroll area
  10198.                 atrib - attribute to be used for blanking
  10199.  
  10200.           v_sapd is a general purpose routine that can be used outside of 
  10201.           the window environment.  
  10202.  
  10203.           A value of 0 for nl scrolls (blanks) the entire area.  To clear 
  10204.           the entire video screen use v_sapd(0, 0, 0, 24, 79, NORMAL).
  10205.  
  10206.           Attributes are defined in winboss.h.
  10207.  
  10208.         RETURNS
  10209.  
  10210.           Nothing.
  10211.  
  10212.         CAUTIONS and ADDITIONAL NOTES
  10213.  
  10214.           None.
  10215.  
  10216.  
  10217.         10.110. v_rcpos -- return current cursor position
  10218.  
  10219.         USAGE
  10220.  
  10221.           v_rcpos(page, row, col);
  10222.           int page;
  10223.           int *row, *col;       /* POINTERS */
  10224.  
  10225.                 int page - video page #     
  10226.                 int *row - pointer to int to receive row value
  10227.                 int *col - pointer to int to receive column value
  10228.  
  10229.           v_rcpos is a general purpose routine that can be used outside 
  10230.           of the window environment.  
  10231.  
  10232.         RETURNS
  10233.  
  10234.           Nothing.
  10235.  
  10236.         CAUTIONS and ADDITIONAL NOTES
  10237.  
  10238.           None.
  10239.  
  10240.  
  10241.  
  10242.                                                            Page: 167
  10243.                                                      The Window BOSS
  10244.  
  10245.  
  10246.  
  10247.         10.111. v_rcvs -- return current video state
  10248.  
  10249.         USAGE
  10250.  
  10251.           v_rcvs(page, vm, cols);
  10252.           int *page, *vm, *cols;        /* POINTERS */
  10253.  
  10254.                 int *page - pointer to int to receive current video page #
  10255.                 int *vm   - pointer to int to receive current video mode
  10256.                 int *cols - pointer to int to receive current screen width
  10257.           
  10258.           v_rcvs is a general purpose routine that can be used outside of 
  10259.           the window environment.
  10260.  
  10261.           Modes are defined in winboss.h.
  10262.  
  10263.         RETURNS
  10264.  
  10265.           Nothing.
  10266.  
  10267.         CAUTIONS and ADDITIONAL NOTES
  10268.  
  10269.           None.
  10270.  
  10271.  
  10272.  
  10273.         10.112. v_getch -- get keyboard character and scan code
  10274.  
  10275.         USAGE
  10276.  
  10277.           v_getch();
  10278.  
  10279.           v_getch is a general purpose routine that can be used outside 
  10280.           of the window environment.
  10281.  
  10282.         RETURNS
  10283.  
  10284.           The character and scan code.  The character is in the low order 
  10285.           byte, the scan code in the high order byte.
  10286.  
  10287.         CAUTIONS and ADDITIONAL NOTES
  10288.  
  10289.           v_getch waits for a key to be struck.
  10290.  
  10291.  
  10292.  
  10293.  
  10294.  
  10295.  
  10296.  
  10297.  
  10298.  
  10299.  
  10300.  
  10301.  
  10302.  
  10303.                                                            Page: 168
  10304.                                                      The Window BOSS
  10305.  
  10306.  
  10307.  
  10308.         10.113. v_kstat -- get keyboard status
  10309.  
  10310.         USAGE
  10311.  
  10312.           v_kstat();
  10313.  
  10314.           v_kstat is a general purpose routine that can be used outside 
  10315.           of the window environment.
  10316.  
  10317.         RETURNS
  10318.  
  10319.           TRUE if a character is available, FALSE if not.
  10320.  
  10321.         CAUTIONS and ADDITIONAL NOTES
  10322.  
  10323.           None.
  10324.  
  10325.  
  10326.  
  10327.         10.114. v_kflush -- flush keyboard buffer
  10328.  
  10329.         USAGE
  10330.  
  10331.           v_kflush();
  10332.  
  10333.           v_kflush clears the keyboard buffer of any pending input.
  10334.  
  10335.         RETURNS
  10336.  
  10337.           Nothing.
  10338.  
  10339.         CAUTIONS and ADDITIONAL NOTES
  10340.  
  10341.           None.
  10342.  
  10343.  
  10344.  
  10345.         10.115. v_border -- set border color
  10346.  
  10347.         USAGE
  10348.  
  10349.           v_border(color)
  10350.           int color;
  10351.  
  10352.              Set overscan border to specified color. 
  10353.  
  10354.         RETURNS
  10355.  
  10356.           Nothing.
  10357.  
  10358.         CAUTIONS and ADDITIONAL NOTES
  10359.  
  10360.           None.
  10361.  
  10362.  
  10363.  
  10364.                                                            Page: 169
  10365.                                                      The Window BOSS
  10366.  
  10367.  
  10368.  
  10369.         10.116. v_setatr -- set color attribute
  10370.  
  10371.         USAGE
  10372.  
  10373.           v_setatr(bg, fg, blink, bold)
  10374.           int bg, fg, blink, bold;
  10375.  
  10376.              bg   -    background color
  10377.              fg   -    foreground color
  10378.              bold -    bold flag
  10379.                          BOLD if bold is desired
  10380.                          FALSE or 0 if bold is not desired
  10381.              blink -   blink flag
  10382.                          BLINK if blink is desired
  10383.                          FALSE or 0 if blink is not desired
  10384.  
  10385.         RETURNS
  10386.  
  10387.           Nothing.
  10388.  
  10389.         CAUTIONS and ADDITIONAL NOTES
  10390.  
  10391.           BLINK, BOLD, FALSE, and all colors are defined in winboss.h
  10392.  
  10393.           BLINK and BOLD apply to foreground colors only.  
  10394.  
  10395.           Example:
  10396.  
  10397.              watrib = v_setatr(WHITE,BLUE,0,BOLD);
  10398.              batrib = v_setatr(WHITE,RED,0,BOLD);
  10399.              wn_open(0, 0, 0, 10, 10, watrib, batrib);
  10400.  
  10401.         10.117. v_setrev -- set reverse attribute
  10402.  
  10403.         USAGE
  10404.  
  10405.           v_setrev(atrib)
  10406.           int atrib;
  10407.  
  10408.              atrib   -    current attribute 
  10409.  
  10410.         RETURNS
  10411.  
  10412.           Reverse video of current attribute.
  10413.  
  10414.         CAUTIONS and ADDITIONAL NOTES
  10415.  
  10416.           See wn_popup for example usage.
  10417.  
  10418.  
  10419.  
  10420.  
  10421.  
  10422.  
  10423.  
  10424.  
  10425.                                                            Page: 170
  10426.                                                      The Window BOSS
  10427.  
  10428.  
  10429.  
  10430.         11. Registration Form
  10431.  
  10432.                                 Registration Form
  10433.                             Star Guidance Consulting
  10434.                                  273 Windy Drive 
  10435.                           Waterbury, Connecticut 06705
  10436.                                  (203) 574-2449
  10437.  
  10438.  
  10439.            Company Name:       _______________________________________
  10440.  
  10441.            Name:               _______________________________________
  10442.  
  10443.            Address:            _______________________________________
  10444.  
  10445.                                _______________________________________
  10446.  
  10447.            City, State, Zip:   _______________________________________
  10448.  
  10449.            Country:            _______________________________________
  10450.  
  10451.            Phone:              _______________________________________  
  10452.  
  10453.            Disk Size: ___5.25" 1.2mb,  ___3.5" 1.44mb
  10454.  
  10455.                   ___ Library Source @ $55.00 USD      $________._____
  10456.                   ___ Shareware      @ $20.00 USD      $________._____
  10457.                       Shipping (Outside USA) $6.00 USD $________._____
  10458.                       Shipping (USA)         $5.00 USD $________._____
  10459.                       Connecticut Sales Tax 6.0%       $________._____ *
  10460.                       (Connecticut residents only)  * 
  10461.                                            TOTAL ------>________._____
  10462.  
  10463.            
  10464.            Favorite compiler: Microsoft C,  Microsoft Quick C
  10465.            (Circle one)       Borland Turbo C++, Borland C++
  10466.                               Mix Power C, Watcom C, Zortech C++
  10467.                               Lattice C
  10468.  
  10469.  
  10470.            MasterCard/Visa: ______________________ Exp Date: ____/____
  10471.            (Circle one)
  10472.  
  10473.            Printed Name:    __________________________________________
  10474.            (On Card)
  10475.                    
  10476.            Signature:       ______________________ Date:____/____/____
  10477.            (Of Card Holder)
  10478.  
  10479.            All funds must be in US Dollars, Call for UPS COD (USA only),
  10480.            Personal and Company Checks Accepted. ll checks must be drawn 
  10481.            against a US Bank and payable in US Dollars.
  10482.  
  10483.  
  10484.  
  10485.  
  10486.                                                            Page: 171
  10487.                                                      The Window BOSS
  10488.  
  10489.  
  10490.  
  10491.  
  10492.         A
  10493.         ASMFILES.LZH, 30
  10494.  
  10495.         B
  10496.         Bad Handle Exits, 43
  10497.         Basics
  10498.           Forms, 4
  10499.           Mouse, 19
  10500.           Windows, 4
  10501.         BCPP.LZH, 34
  10502.         BIOS, 45
  10503.         Borland C++, 58
  10504.         Borland Turbo C, 47
  10505.         Borland Turbo C++, 47
  10506.         BOSS_DOC.LZH, 26, 27
  10507.         BOSS_LB1.LZH, 26, 27, 28, 38
  10508.         BOSS_LB2.LZH, 26, 27, 28
  10509.         BOSS_LB3, 29
  10510.         BOSS_LB3.LZH, 26, 27
  10511.         BOSS_LB4, 29
  10512.         BOSS_LB4.LZH, 26, 27
  10513.         BOSS_LB5, 29
  10514.         BOSS_LB5.LZH, 27
  10515.         BOSS_LB6, 29
  10516.         BOSS_LB7, 29
  10517.         BOSS_SUP.LZH, 26, 27, 28, 38
  10518.         Bulletin Board
  10519.           Files, 26
  10520.           Support, 26
  10521.  
  10522.         C
  10523.         CFILES.LZH, 30, 31, 32
  10524.         CSM.BAT, 39
  10525.  
  10526.         D
  10527.         Data Entry (Basics), 6
  10528.         DEMO.LZH, 30
  10529.         DOC.LZH, 30
  10530.         dos.mac, 59
  10531.  
  10532.         F
  10533.         fields, 23
  10534.         Fixup Errors, 42
  10535.         FLASH, 45
  10536.         forms, 23
  10537.           closing, 23
  10538.         Forms (Basics), 7
  10539.  
  10540.         G
  10541.         GENINDEX, 14, 15, 17, 130
  10542.         Globals, 45
  10543.  
  10544.  
  10545.  
  10546.  
  10547.                                                            Page: 172
  10548.                                                      The Window BOSS
  10549.  
  10550.  
  10551.  
  10552.         H
  10553.         Help System
  10554.           Basics, 14
  10555.           Notes, 16, 17
  10556.  
  10557.         I
  10558.         INCLUDE Files, 39, 40
  10559.  
  10560.         L
  10561.         Lattice C, 49
  10562.         LC6.LZH, 33
  10563.         LDATA, 59
  10564.         LHARC.DOC, 30
  10565.         LHARC.EXE, 30
  10566.         LHAR_DOC.LZH, 26
  10567.         LPROG, 59
  10568.         LWIN.LIB, 38
  10569.         LZH Files, 26
  10570.  
  10571.         M
  10572.         macros.asm, 59
  10573.         Microsoft C, 46
  10574.         Microsoft Quick C, 46
  10575.         mitem, 9
  10576.         Mix Power C, 47
  10577.         MIX.LZH, 30, 33
  10578.         model.h, 59
  10579.         Mouse (Basics), 19, 20, 21
  10580.         mo_clim, 142
  10581.         mo_hide, 137
  10582.         mo_locate, 151
  10583.         mo_lpoff, 148
  10584.         mo_lpon, 148
  10585.         mo_motion, 146
  10586.         mo_move, 139
  10587.         mo_nbutt, 159
  10588.         mo_pbinfo, 140
  10589.         mo_pos, 138
  10590.         mo_press, 152
  10591.         mo_ratio, 148
  10592.         mo_rbinfo, 141
  10593.         mo_rcpos, 149
  10594.         mo_reigon, 156
  10595.         mo_release, 154
  10596.         mo_reset, 135
  10597.         mo_rlim, 142
  10598.         mo_scursor, 144
  10599.         mo_setptr, 157
  10600.         mo_sgcursor, 143
  10601.         mo_show, 136
  10602.         mo_task, 147
  10603.         mo_wait, 158
  10604.         MS6.LZH, 30, 35
  10605.         MSQC.LZH, 30
  10606.  
  10607.  
  10608.                                                            Page: 173
  10609.                                                      The Window BOSS
  10610.  
  10611.  
  10612.  
  10613.         MSQC25.LZH, 35
  10614.         msvlib.asm, 59
  10615.         MWIN.MIX, 38
  10616.  
  10617.         O
  10618.         Offset Errors, 42
  10619.  
  10620.         P
  10621.         PAINT, 45
  10622.         pcvlib.asm, 59
  10623.         pmenu, 9, 10, 11
  10624.         Popup Menus (Basics), 8
  10625.  
  10626.         R
  10627.         REVHST.LZH, 30
  10628.  
  10629.         S
  10630.         Shareware Diskette, 26
  10631.         Source Diskette, 26
  10632.         Support, 2
  10633.         Support Services, 2
  10634.         SWIN.LIB, 38
  10635.  
  10636.         T
  10637.         TCPP.LZH, 34
  10638.         tcvlib.asm, 58
  10639.         TopSpeed C, 48, 55
  10640.         TSC.LZH, 30, 37
  10641.         Turbo C++, 58
  10642.  
  10643.         U
  10644.         Unresolved Externals, 42
  10645.  
  10646.         V
  10647.         video attributes, 22
  10648.         vlib.asm, 59
  10649.         v_border, 169
  10650.         v_cls, 162
  10651.         v_gctype, 165
  10652.         v_getch, 168
  10653.         v_hidec, 164
  10654.         v_kflush, 169
  10655.         v_kstat, 169
  10656.         v_locate, 164
  10657.         v_rcpos, 167
  10658.         v_rcvs, 168
  10659.         v_sapd, 167
  10660.         v_sapu, 166
  10661.         v_sctype, 165
  10662.         v_setatr, 170
  10663.         v_setrev, 170
  10664.         v_smode, 162
  10665.         v_spage, 161
  10666.         v_wca, 163
  10667.  
  10668.  
  10669.                                                            Page: 174
  10670.                                                      The Window BOSS
  10671.  
  10672.  
  10673.  
  10674.         v_wtty, 163
  10675.  
  10676.         W
  10677.         Watcom C, 49
  10678.         WATCOM.LZH, 30, 36
  10679.         wcvlib.asm, 59
  10680.         WINBOSS.EXT, 39, 40, 45
  10681.         WINBOSS.FNS, 39, 40
  10682.         WINBOSS.H, 39, 40
  10683.         window handles, 22
  10684.         window origin, 22
  10685.         windows
  10686.           closing, 23
  10687.           overlapping, 24
  10688.           tiled, 24
  10689.         Windows (Basics), 5
  10690.         WINDOWS.C, 45
  10691.         WINDOWS.FN6, 39
  10692.         WINDOWS.FNT, 39
  10693.         WINDOWS.FNZ, 39
  10694.         wns_escape, 45
  10695.         wn_activate, 78
  10696.         wn_boxset, 83
  10697.         wn_close, 69
  10698.         wn_clr, 78
  10699.         wn_color, 79
  10700.         wn_dborder, 84
  10701.         wn_delrow, 77
  10702.         wn_dma, 82
  10703.         wn_dmaflg, 45
  10704.         wn_dmode, 45, 63
  10705.         wn_dtext, 123
  10706.         wn_exit, 62
  10707.         wn_fixcsr, 82
  10708.         wn_frmcls, 92
  10709.         wn_frmget, 91
  10710.         wn_frmopn, 90
  10711.         wn_gatext, 103
  10712.         wn_gbool, 121
  10713.         wn_gdate, 93
  10714.         wn_gdouble, 119
  10715.         wn_gedate, 95
  10716.         wn_getca, 76
  10717.         wn_gets, 74
  10718.         wn_gfloat, 117
  10719.         wn_gint, 109
  10720.         wn_glong, 113
  10721.         wn_gltext, 103
  10722.         wn_gmltext, 105
  10723.         wn_gphone, 99
  10724.         wn_gpword, 107
  10725.         wn_gssn, 101
  10726.         wn_gtext, 103
  10727.         wn_gtime, 97
  10728.  
  10729.  
  10730.                                                            Page: 175
  10731.                                                      The Window BOSS
  10732.  
  10733.  
  10734.  
  10735.         wn_guint, 111
  10736.         wn_gulong, 115
  10737.         wn_gutext, 103
  10738.         wn_help, 131
  10739.         wn_hlinit, 14, 15, 128
  10740.         wn_iemsg, 124
  10741.         wn_ihmsg, 125
  10742.         wn_init, 62
  10743.         wn_input, 85
  10744.         wn_insrow, 77
  10745.         wn_locate, 71
  10746.         wn_move, 70
  10747.         wn_natrib, 83
  10748.         wn_open, 64
  10749.         wn_pmenu, 12
  10750.         wn_popup, 8, 11, 126
  10751.         wn_printf, 72
  10752.         wn_psinit, 62
  10753.         wn_putc, 73
  10754.         wn_putca, 75
  10755.         wn_puts, 73
  10756.         wn_putsa, 75
  10757.         wn_qpopup, 8, 12, 127
  10758.         wn_restore, 70
  10759.         wn_save, 69
  10760.         wn_sbit, 45
  10761.         wn_scenter, 133
  10762.         wn_scroll, 45, 81
  10763.         wn_sdelspc, 134
  10764.         wn_shkey, 85, 86, 125
  10765.         wn_sleftj, 132
  10766.         wn_srightj, 132
  10767.         wn_stitla, 68
  10768.         wn_stitle, 67
  10769.         wn_strndx, 134
  10770.         wn_sync, 80
  10771.         wn_titla, 66
  10772.         wn_title, 66
  10773.         wn_wrap, 80
  10774.  
  10775.         X
  10776.         XMWIN.LIB, 38
  10777.  
  10778.         Z
  10779.         Zortec C, 47
  10780.         Zortech, 49
  10781.         ZTC.LZH, 30, 36
  10782.  
  10783.         _
  10784.         _getca, 160
  10785.         _putca, 160
  10786.         _vidblt, 161
  10787.  
  10788.  
  10789.  
  10790.  
  10791.                                                            Page: 176
  10792. 
  10793.